MIDI.js icon indicating copy to clipboard operation
MIDI.js copied to clipboard

General MIDI Percussion soundfonts

Open letoribo opened this issue 10 years ago • 16 comments

mudcube,please,where can I find Pre-rendered General MIDI Percussion soundfonts (Nrs 27-87),to use in my project with midi.js?

letoribo avatar Jul 29 '14 20:07 letoribo

any ideas?

letoribo avatar Aug 08 '14 22:08 letoribo

You can run the soundfont_builder.rb file after modifying a little; something like this

def generate_midi(program, note_value, file)
  include MIDI
  seq = Sequence.new()
  track = Track.new(seq)

  seq.tracks << track
  # channel 9 + 1 is percussion by default
  track.events << NoteOn.new(9, note_value, VELOCITY, 0) # channel, note, velocity, delta
  track.events << NoteOff.new(9, note_value, VELOCITY, DURATION)

clubfest avatar Aug 20 '14 20:08 clubfest

thx a lot, but this will not work on windows crying

letoribo avatar Aug 21 '14 09:08 letoribo

Check out

https://github.com/clubfest/MIDI.js

clubfest avatar Aug 22 '14 02:08 clubfest

some of my apps currently uses jazz plugin. i'm looking for soundset, identical to: http://jazz-soft.net/demo/GeneralMidiPerc.html soundset = { 27 : "High-Q", 28 : "Slap", 29 : "Scratch Push", 30 : "Scratch Pull", 31 : "Sticks", 32 : "Square Click", 33 : "Metronome Click", 34 : "Metronome Bell", 35 : "Acoustic Bass Drum", 36 : "Bass Drum", 37 : "Side Stick", 38 : "Acoustic Snare", 39 : "Hand Clap", 40 : "Electric Snare", 41 : "Low Floor Tom", 42 : "Closed Hi Hat", 43 : "High Floor Tom", 44 : "Pedal Hi-Hat", 45 : "Low Tom", 46 : "Open Hi-Hat", 47 : "Low-Mid Tom", 48 : "Hi-Mid Tom", 49 : "Crash Cymbal 1", 50 : "High Tom", 51 : "Ride Cymbal 1", 52 : "Chinese Cymbal", 53 : "Ride Bell", 54 : "Tambourine", 55 : "Splash Cymbal", 56 : "Cowbell", 57 : "Crash Cymbal 2", 58 : "Vibraslap", 59 : "Ride Cymbal 2", 60 : "Hi Bongo", 61 : "Low Bongo", 62 : "Mute Hi Conga", 63 : "Open Hi Conga", 64 : "Low Conga", 65 : "High Timbale", 66 : "Low Timbale", 67 : "High Agogo", 68 : "Low Agogo", 69 : "Cabasa", 70 : "Maracas", 71 : "Short Whistle", 72 : "Long Whistle", 73 : "Short Guiro", 74 : "Long Guiro", 75 : "Claves", 76 : "Hi Wood Block", 77 : "Low Wood Block", 78 : "Mute Cuica", 79 : "Open Cuica", 80 : "Mute Triangle", 81 : "Open Triangle", 82 : "Shaker", 83 : "Jingle Bell", 84 : "Bell Tree", 85 : "Castanets", 86 : "Mute Surdo", 87 : "Open Surdo" }

letoribo avatar Aug 22 '14 13:08 letoribo

Not working in Chrome but works in IE??? That's a first :-)

On 22 August 2014 14:33, clubfest [email protected] wrote:

Check out

https://github.com/clubfest/MIDI.js

— Reply to this email directly or view it on GitHub https://github.com/mudcube/MIDI.js/issues/91#issuecomment-53015334.

Elder Jan van Schalkwyk

76 Rathmar Drive, Manurewa, Auckland 2105 | P +64 9 266 3498 | M +64 027 272 3320 | E [email protected]

The information contained in this document is confidential and may also be legally privileged and is intended only for the addressee. If you are not the addressee, you are hereby notified that any use or dissemination of this information and the copying of the document is strictly prohibited. If you are not the addressee, please notify us immediately by telephone on 09 266 3498 within New Zealand, or +64 9 266 3498, internationally.

janvsc avatar Aug 23 '14 01:08 janvsc

Works for me in Chrome. In any case, you can just copy the sound files in the synth-drum folder in my fork to the appropriate place.

clubfest avatar Aug 26 '14 20:08 clubfest

looking for Pre-rendered General MIDI Percussion soundfonts (Nrs 27-87),to rewrite this app: https://github.com/letoribo/drums-io

letoribo avatar Sep 01 '14 19:09 letoribo

I am also interested in acoustic drums/Percussion for my project. Has anybody built or found anything like this? Unfortunately I am also on Windows and unable to run the builder utility.

mb2140 avatar Sep 08 '14 21:09 mb2140

I have a few Percussion Sound fonts in a proof of concept project I had done. I think I just used one of the base 64 online converters and then copy and pasted over the current sound in the ogg.js file.

https://github.com/djlerman/midiclassjs

djlerman avatar Sep 09 '14 03:09 djlerman

Thanks! I'll check it out. Are you saying that I can just take a regular mp3, convert to base64 and replace the sounds in the existing .js file? That sounds easy enough.

mb2140 avatar Sep 09 '14 03:09 mb2140

I think it needs to be an ogg file.

Here is an example. Take a look at the source code: https://iqaat.com/testScripts/ogg.html

Here is the code I used with midi.js. Silenced out all of the notes except the ones I needed. https://github.com/djlerman/midiclassjs/blob/master/soundfont/steel_drums-ogg.js

djlerman avatar Sep 09 '14 03:09 djlerman

Yep, you were exactly right. I've got it working using some drum samples I had laying around. Loving this thing!

mb2140 avatar Sep 09 '14 04:09 mb2140

these soundfonts created by converting from *** GeneralUser GS v1.44 *** http://www.schristiancollins.com/generaluser.php can be found in this repo: https://github.com/letoribo/General-MIDI-Percussion-soundfonts-for-MIDI.js-

this is MIDI.js version of Paradiddles System: https://www.npmjs.com/package/drums

and this is a demo: https://drums.herokuapp.com/

many thanks

letoribo avatar Apr 01 '15 17:04 letoribo

The builder is a simple ruby program to run fluidsynth to render the sound font to WAV, then lame to make MP3 and oggenc to make OGG. If you could get those tools on Windows there's no reason why it wouldn't run there?

MIDI.js needs hacking to load a drumkit patch set also. The drumkit is not in the normal instrument range 1-128 and MIDI.js has no concept of it as-is.

hmoffatt avatar Jul 11 '16 08:07 hmoffatt

I don't see that we have to use a different soundfont: the FluidR3 font at least does seem to contain percussion instruments just fine. All I had to do in #187 was change the soundfont builder to use channel 10 in order to extract these. I guess dedicated percussion fonts might have superior quality in some cases, but is this the motivation behind what people have been doing here so far?

gagern avatar Jul 25 '16 17:07 gagern