mudcube / MIDI.js

:musical_keyboard: Making life easy to create a MIDI-app on the web. Includes a library to program synesthesia into your app for memory recognition or for creating trippy effects. Convert soundfonts for Guitar, Bass, Drums, ect. into code that can be read by the browser. Supports multiple simultaneous instruments and perfect timing.
http://mudcu.be/midi-js/
MIT License
3.77k stars 640 forks source link

General MIDI Percussion soundfonts #91

Open letoribo opened 9 years ago

letoribo commented 9 years ago

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

letoribo commented 9 years ago

any ideas?

clubfest commented 9 years ago

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)
letoribo commented 9 years ago

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

clubfest commented 9 years ago

Check out

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

letoribo commented 9 years ago

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" }

janvsc commented 9 years ago

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

On 22 August 2014 14:33, clubfest notifications@github.com 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 midicons@gmail.com

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.

clubfest commented 9 years ago

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.

letoribo commented 9 years ago

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

mb2140 commented 9 years ago

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.

djlerman commented 9 years ago

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

mb2140 commented 9 years ago

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.

djlerman commented 9 years ago

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

mb2140 commented 9 years ago

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

letoribo commented 9 years ago

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

hmoffatt commented 7 years ago

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.

gagern commented 7 years ago

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?