gleitz / midi-js-soundfonts

Pre-rendered General MIDI soundfonts that can be used immediately with MIDI.js
http://blog.gleitzman.com/post/63283830260/midi-js-playing-audio-in-the-browser-with-javascript
MIT License
674 stars 148 forks source link

Musyng Kite drum kits missing #32

Open RobAley opened 4 years ago

RobAley commented 4 years ago

Hi, Thanks for a great set of instruments.

According to this post from the author : https://www.kvraudio.com/forum/viewtopic.php?t=351893 there are 12 drum kits in Musyng Kite. None of these appear to be present in this midi.js version.

I know that it is possible to use drum kits in this way, I've been using the one here : https://github.com/johntu/midi-js-gm1-percussion

I would like to help, if I can, to create/convert these kits into the midi.js format, however I don't know where to begin (or indeed if they are already there somewhere and I am missing them!). Do you have any pointers?

Thanks,

Rob

gleitz commented 3 years ago

Hey @RobAley,

I did a little digging inside the Musyng Kite soundfont. Using fluidsynth (or sforzando) to load the .sf2 file, I dumped all the banks and presets (using inst 1).

As you can see there are the "usual suspects" in bank 000, which is the bank that generated most of the soundfonts in this repo. However, if you check out bank 128 it's full of drum kits and there are instruments like preset 025 which has "TR 808".

MIDI.js does not have the concept of these banks. You can think of banks almost as their own separate soundfount that you would reference in loadPlugin and then pick instruments from as usual. In the midi-js-gm1-percussion you referenced they load one drum kit into the instrument that MIDI.js calls steel_drums (which is id 114). I did this with the Tabla soundfont from @shivrajsa, a Soundfont containing a single instrument, the tabla, mapped into acoustic_grand_piano also known as id 0.

A path forward might be to generate some of these other banks into soundfonts of their own, starting with bank 128 which seems to have some pretty sweet percussive instruments. You'd still have to reference these new instruments by MIDI.js's default names (or by id, which might make more sense), but you'd get access to a new world of sound.

Finally, I really like the FatBoy soundfont that @Miserlou found which also has some cool banks. I've included them here so you can see what's available.

Musyng Kite Banks and Presets

000-000 AcousticGrand Piano
000-001 Bright Grand Piano
000-002 ElectricGrand Piano
000-003 Honky-tonk
000-004 Rhodes Piano
000-005 Electric Piano 2
000-006 Harpsichord
000-007 Clavinet velocity
000-008 Celesta
000-009 Glockenspiel
000-010 Music Box
000-011 Vibraphone
000-012 Marimba
000-013 Xylophone
000-014 Tubular Bells
000-015 Dulcimer
000-016 Drawbar Organ
000-017 Percussive Organ
000-018 Rock Organ
000-019 Church Organ
000-020 Reed Organ
000-021 Accordion
000-022 Harmonica
000-023 Bandoneon
000-024 Nylon Guitar
000-025 Steel Guitar
000-026 Jazz Guitar
000-027 Clean Guitar
000-028 Muted Guitar
000-029 Overdriven Guitar
000-030 Distortion Guitar
000-031 Gt. Harmonics
000-032 Acoustic Bass
000-033 Finger Bass
000-034 Pick Bass
000-035 Fretless Bs.
000-036 Slap Bass
000-037 Slap Bass 2
000-038 Synth Bass 1
000-039 Synth Bass 2
000-040 Violin
000-041 Viola
000-042 Cello
000-043 Contrabass
000-044 Tremolo Strings
000-045 Pizzicato Strings
000-046 Celtic Harp
000-047 Timpani
000-048 Strings Ensemble
000-049 Slow Strings
000-050 Synth Strings1
000-051 Synth Strings2
000-052 Choral Aahs
000-053 Doo Vox
000-054 Synth Vox
000-055 Orchestra Hit
000-056 Trumpet
000-057 Trombones
000-058 Tubas
000-059 Mute Trumpet
000-060 French Horns
000-061 Brass Section
000-062 Synth Brass 1
000-063 Synth Brass 2
000-064 Soprano Sax
000-065 Alto Sax Eva
000-066 Tenor Sax
000-067 Baritone Sax
000-068 Oboe
000-069 English Horn
000-070 Bassoon
000-071 Clarinet Legato
000-072 Piccolo
000-073 Flute
000-074 Recorder
000-075 Pan Flute
000-076 Bottle Blow
000-077 Shakuhachi
000-078 Whistle
000-079 Ocarina
000-080 Square Lead
000-081 Saw  Wave
000-082 Calliope Lead
000-083 Chiffer Lead
000-084 Charang
000-085 Solo Vox
000-086 5th Saw Wave
000-087 Bass & Lead
000-088 Fantasia
000-089 Warm Strings
000-090 Polysynth
000-091 Voice Pad
000-092 Bowed Pad
000-093 Metal Pad
000-094 Halo Pad
000-095 Sweep Pad
000-096 Ice Rain
000-097 SoundTrack
000-098 Crystal
000-099 Atmosphere
000-100 Brightness
000-101 Goblin
000-102 Echoes
000-103 Star Theme
000-104 Sitar
000-105 Banjo
000-106 Shamisen
000-107 Koto
000-108 Kalimba
000-109 Bagpipe
000-110 Fiddle
000-111 Shenai
000-112 Tinker Bell
000-113 Agogo
000-114 Steel Pan
000-115 Woodblock
000-116 Taiko Drum
000-117 Melodic Tom
000-118 Synth Drum
000-119 Reverse Cymbal
000-120 Fret Noise
000-121 Breath
000-122 Seashore
000-123 Bird
000-124 Telephone
000-125 Helicopter
000-126 Applause
000-127 Gun Shot
001-000 Sweet Melodic Choir
001-030 Distortion Guitar 2
001-120 Cut Noise
001-121 Fl. Key Click
001-122 Rain
001-123 Dog
001-124 Telephone 2
001-125 Car Engine
001-126 Laughing
001-127 Machine Gun
002-120 String Slap
002-122 Thunder
002-123 Horse Gallop
002-124 Door Creak
002-125 Car Skid
002-126 Screaming
002-127 Lazer Gun
003-122 Wind
003-123 Bird 2
003-124 Door Slam
003-125 Car-Pass
003-126 Punch
003-127 Explosion
004-122 Stream
004-124 Scratch
004-125 Car-Crash
004-126 Heart Beat
005-122 Bubble
005-124 Windchime
005-125 Siren
005-126 Footsteps
006-125 Train
007-125 Jet Plane
008-004 Detuned EP1
008-005 Detuned EP2
008-006 Coupled Harpsichord
008-014 Church Bell
008-016 Detuned Organ 1
008-017 Detuned Perc Organ
008-018 Detuned Organ 3
008-019 Church Organ 2
008-021 Italian Accordion
008-024 Ukulele
008-025 12 Str. Gtr
008-026 Hawaiian Guitar
008-027 Chorus Strat
008-028 Funk Guitar
008-030 FeedBack Guitar
008-031 Guitar Feedback
008-038 Synth Bass 3
008-039 Synth Bass 4
008-040 Slow Violin
008-048 Orchestra Pad
008-050 Synth Strings 3
008-061 Brass 2
008-062 Synth Brass 3
008-063 Synth Brass 4
008-080 Ac Sine Wave
008-081 Doctor Solo
008-107 Taisho Koto
008-115 Castanets
008-116 Concert Bass Drum
008-117 Melo Tom 2
008-118 808 Tom
008-125 Starship
009-125 Burst Noise
016-024 Mandolin
127-000 Standard
127-001 Standard 2
127-002 Synthkorg
127-003 Electro
127-008 Room
127-009 Room 2
127-010 Pop
127-011 Rave
127-012 Gabba
127-014 House 2
127-016 Power
127-024 Electronic
127-025 TR 808
127-026 TR909 Dance
127-027 Dance 2
127-028 Techno
127-029 Industrial
127-030 Africa
127-031 Latin (Loops)
127-032 Jazz
127-033 Jazz 2
127-040 Brush
127-048 Orchestra Drums
127-050 Ethnic Percussion
127-056 SFX
127-127 CM 64/32
128-000 Standard
128-001 Standard 2
128-002 Synthkorg
128-003 Electro
128-008 Room
128-009 Room 2
128-010 Pop
128-011 Rave
128-012 Gabba
128-014 House 2
128-015 Jungle
128-016 Power
128-024 Electronic
128-025 TR 808
128-026 TR909 Dance
128-027 Dance 2
128-028 Techno
128-029 Industrial
128-030 Africa
128-031 Latin (Loops)
128-032 Jazz
128-033 Jazz 2
128-040 Brush
128-048 Orchestra Drums
128-050 Ethnic Percussion
128-056 SFX Set
128-127 CM 64/32

FatBoy Banks and Presets

000-000 ACOUSTIC GRAND
000-001 BRIGHT GRAND
000-002 ELECTRIC GRAND
000-003 HONKY TONK
000-004 E.PIANO 1 (Rhodes)
000-005 E.PIANO 2
000-006 HARPSICHORD
000-007 CLAVINET
000-008 CELESTA
000-009 GLOCKENSPIEL
000-010 MUSIC BOX
000-011 VIBRAPHONE
000-012 MARIMBA
000-013 XYLOPHONE
000-014 TUBULAR BELLS
000-015 DULCIMER
000-016 DRAWBAR ORGAN
000-017 PERCUSSIVE ORGAN
000-018 ROCK ORGAN
000-019 CHURCH ORGAN
000-020 REED ORGAN
000-021 ACCORDIAN
000-022 HARMONICA
000-023 BANDONEON
000-024 NYLON GUITAR
000-025 STEEL GUITAR
000-026 JAZZ GUITAR
000-027 CLEAN GUITAR
000-028 MUTED GUITAR
000-029 OVERDRIVEN GUITAR
000-030 DISTORTED GUITAR
000-031 GUITAR HARMONICS
000-032 UPRIGHT BASE
000-033 FINGER BASS
000-034 PICK BASS
000-035 FRETLESS BASS
000-036 SLAP BASS 1
000-037 SLAP BASS 2
000-038 SYNTH BASS 1
000-039 SYNTH BASS 2
000-040 VIOLIN
000-041 VIOLA
000-042 CELLO
000-043 CONTRABASS
000-044 TREMOLO STRINGS
000-045 PIZZICATO STRINGS
000-046 HARP
000-047 TIMPANI
000-048 STRINGS
000-049 SLOW STRINGS
000-050 SYNTH STRINGS 1
000-051 SYNTH STRINGS 2
000-052 CHOIR AAHS
000-053 CHOIR OOHS
000-054 SYNTH VOX
000-055 ORCHESTRA HIT
000-056 TRUMPET
000-057 TROMBONE
000-058 TUBA
000-059 MUTED TRUMPET
000-060 FRENCH HORNS
000-061 BRASS
000-062 SYNTH BRASS 1
000-063 SYNTH BRASS 2
000-064 SOPRANO SAX
000-065 ALTO SAX
000-066 TENOR SAX
000-067 BARITONE SAX
000-068 OBOE
000-069 ENGLISH HORN
000-070 BASSOON
000-071 CLARINET
000-072 PICCOLO
000-073 FLUTE
000-074 RECORDER
000-075 PAN FLUTE
000-076 BOTTLE CHIFF
000-077 SHAKUHACHI
000-078 WHISTLE
000-079 OCARINA
000-080 SQUARE WAVE
000-081 SAW WAVE
000-082 CALLIOPE
000-083 CHIFLEAD
000-084 CHARANG
000-085 SOLO VOX
000-086 5TH SAW WAVE
000-087 BASS & LEAD
000-088 FANTASIA
000-089 WARM PAD
000-090 POLYSYNTH
000-091 SPACE VOICE
000-092 BOWED GLASS
000-093 METAL PAD
000-094 HALO PAD
000-095 SWEEP PAD
000-096 ICE RAIN
000-097 SOUNDTRACK
000-098 CRYSTAL
000-099 ATMOSPHERE
000-100 BRIGHTNESS
000-101 GOBLIN
000-102 ECHO DROPS
000-103 STAR THEME
000-104 SITAR
000-105 BANJO
000-106 SHAMISEN
000-107 KOTO
000-108 KALIMBA
000-109 BAGPIPE
000-110 FIDDLE
000-111 SHENAI
000-112 TINKLE BELL
000-113 AGOGO
000-114 STEEL DRUMS
000-115 WOODBLOCK
000-116 TAIKO
000-117 MELODIC TOM
000-118 SYNTH DRUM
000-119 REVERSE CYMBAL
000-120 FRET NOISE FX
000-121 BREATH NOISE FX
000-122 SEASHORE FX
000-123 BIRD FX
000-124 TELEPHONE FX
000-125 HELICOPTER FX
000-126 APPLAUSE FX
000-127 GUN SHOT FX
001-000 POLYSYNTH 1
001-008 POP CELESTA
001-028 MUTED DIST. GUITAR
001-038 SYNTH BASS 101
001-044 MONO STRINGS TREM
001-048 MONO STRINGS FAST
001-049 MONO STRINGS SLOW
001-050 OB STRINGS
001-052 CONCERT CHOIR MONO
001-056 TRUMPET 2
001-057 TROMBONE 2
001-059 MUTED TRUMPET 2
001-060 SOLO FRENCH HORN
001-061 BRASS SECTION MONO
001-073 FLUTE 2
001-080 SQUARE WAVE 1
001-081 SAW WAVE 1
001-088 FANTASIA 2
001-098 SYNTH MALLET
001-120 CUT NOISE FX
001-121 FL. KEY CLICK FX
001-122 RAIN FX
001-123 DOG FX
001-124 TELEPHONE 2 FX
001-125 CAR-ENGINE FX
001-126 LAUGHING FX
001-127 MACHINE GUN FX
002-102 ECHO PAN
002-120 STRING SLAP FX
002-122 THUNDER FX
002-123 HORSE GALLOP FX
002-124 DOOR CREAK FX
002-125 CAR STOP FX
002-126 SCREAM FX
002-127 LASERGUN FX
003-050 JP STRINGS
003-055 EURO HIT
003-080 MELLOW FM
003-098 ROUND GLOCKENSPIEL
003-122 HOWLING WIND FX
003-123 BIRD 2 FX
003-124 DOOR FX
003-125 CAR DOPPLER FX
003-126 PUNCH PX
003-127 EXPLOSION FX
004-122 STREAM FX
004-123 SCRATCH FX
004-125 CAR CRASH FX
004-126 HEARTBEAT FX
005-122 BUBBLES FX
005-124 WINDCHIME FX
005-125 SIREN FX
005-126 FOOTSTEPS FX
006-125 TRAIN FX
007-125 JET PLANE FX
008-004 CHORUSED TINE EP
008-005 CHORUSED FM EP
008-006 COUPLED HARPSICHORD
008-014 CHURCH BELLS
008-016 DETUNED TNWL. ORGAN
008-017 DETUNED PERC. ORGAN
008-019 PIPE ORGAN 2
008-021 ITALIAN ACCORDIAN
008-024 UKULELE
008-025 12-STRING GUITAR
008-026 HAWAIIAN GUITAR
008-027 CHORUSED CLEAN GT.
008-028 FUNK GUITAR
008-030 FEEDBACK GUITAR
008-031 GUITAR FEEDBACK
008-038 SYNTH BASS 3
008-039 SYNTH BASS 4
008-048 ORCHESTRA PAD
008-050 SYNTH STRINGS 3
008-061 BRASS SECTION 2
008-062 SYNTH BRASS 3
008-063 SYNTH BRASS 4
008-080 SINE WAVE
008-081 DOCTOR SOLO
008-107 TAISHO KOTO
008-115 CASTANETS
008-116 CONCERT BASS DRUM
008-117 MELODIC TOM 2
008-118 TR-808 TOM
008-125 STARSHIP FX
009-014 CARILLON
009-125 BURST NOISE FX
011-000 PIANO & STR. FADE
011-001 PIANO & STR. SUS
011-004 TINE & FM EP
011-005 PIANO & FM EP
011-008 TINKLING BELLS
011-014 BELL TOWER
011-038 TECHNO BASS
011-039 PULSE BASS
011-049 STEREO STRINGS VELO
011-050 SYNTH STRINGS 4
011-051 SYNTH STRINGS 5
011-061 BRASS SECTION 3
011-078 WHISTLIN'
011-081 SAWTOOTH STAB
011-087 DOCTOR'S SOLO
011-088 HARPSICHORD PAD
011-089 SOLAR WIND
011-096 MYSTERY PAD
011-098 SYNTH CHIME
011-100 BRIGHT SAW STACK
011-119 CYMBAL CRASH
011-121 FILTER SNAP FX
011-127 INTERFERENCE FX
012-000 BELL PIANO
012-004 BELL TINE EP
012-010 CHRISTMAS BELLS
012-027 CLEAN GUITAR 2
012-038 MEAN SAW BASS
012-048 FULL ORCHESTRA
012-049 MONO STRINGS VELO
012-080 SQUARE LEAD 2
012-081 SAW LEAD 2
012-088 FANTASIA 2
012-089 SOLAR WIND 2
012-119 TAMBOURINE
012-122 WHITE NOISE WAVE
012-127 SHOOTING STAR FX
013-048 WOODWIND CHOIR
013-080 SQUARE LEAD 3
013-081 SAW LEAD 3
013-088 NIGHT VISION
016-025 MANDOLIN
120-000 STANDARD DRUMS
120-001 STANDARD 2 DRUMS
120-008 ROOM DRUMS
120-016 POWER DRUMS
120-024 ELECTRONIC DRUMS
120-025 808/909 DRUMS
120-026 DANCE DRUMS
120-032 JAZZ DRUMS
120-040 BRUSH DRUMS
120-048 ORCHESTRAL PERC.
120-056 SFX KIT
127-050 ETHNIC PERCUSSION
128-000 STANDARD DRUM SET
128-008 ROOM SET
128-016 POWER SET
128-024 ELECTRONIC SET
128-025 TR-808 SET
128-032 JAZZ SET
128-040 BRUSH SET
128-048 ORCHESTRAL SET
128-050 ETHNIC SET
128-056 SFX SET
128-118 (Fixes some MIDI)
128-127 CM-64/32L SET

p.s. If you're using fluidsynth you can load bank 128 preset 25 (TR 808) with select 0 0 128 25 and then play a note with something like noteon 0 36 100.

RobAley commented 3 years ago

Hi @gleitz, Thanks, I did come across the concept of banks when I was playing around with this after my post although I didn't dig too deep, and I haven't played with this stuff for over a year now! Not sure when/if I'll get back to looking at this stuff, but this is very helpful if I do. Feel free to close or leave open for others if needed. Thanks.

fheyen commented 3 years ago

Hi @gleitz,

I was using the percussion file from the FluidR3_GM font, which now no longer exists. Would it be possible to add it again? In case there are issues with just adding it to FluidR3_GM again, could you just put it in a new font? Thanks a lot in advance!

gleitz commented 3 years ago

Good call. percussion was added in this PR. @supersational I see you mapped percussion into instrument 254. Do you happen to know if that drum kit was from one of the kits in bank 128? Any reason for picking 254?

I agree that we should probably just create a new font with the drumkits. Then there's just the question of how and where to map the instruments. We could do something like map the Standard kit (000 in bank 128) into Acoustic Grand Piano (000 in General MIDI).

128-000 Standard
128-001 Standard 2
128-002 Synthkorg
128-003 Electro
128-008 Room
128-009 Room 2
128-010 Pop
128-011 Rave
128-012 Gabba
128-014 House 2
128-015 Jungle
128-016 Power
128-024 Electronic
128-025 TR 808
128-026 TR909 Dance
128-027 Dance 2
128-028 Techno
128-029 Industrial
128-030 Africa
128-031 Latin (Loops)
128-032 Jazz
128-033 Jazz 2
128-040 Brush
128-048 Orchestra Drums
128-050 Ethnic Percussion
128-056 SFX Set
128-127 CM 64/32
Maxiiimus commented 3 years ago

Hi @gleitz - This project is great! I've been playing around with it and found the missing drum kit a bummer. I've tried the percussion-mp3.js file in the above PR, but it's not the same quality as the rest. Just curious if you're still considering creating a font with drum kits?

gleitz commented 3 years ago

@Maxiiimus Which drum file was low quality for you?

The issue I was running into with my generation script, at least with Musyng Kite, is that percussion instruments are not in the default bank 0 of the soundfont, but instead in some higher number like 127 or 128. Here's the script. I'm using the -F flag for fast render, like this:

fluidsynth -C no -R no -g 0.5 -F ./soundfont-manual/acoustic_grand_pianoA0.wav ../sf2/Musyng.sf2 ./soundfont-manual/A0acoustic_grand_pianotemp.midi

Here's how the midi file is generated.

This equates to the following commands:

» fluidsynth ./Musyng.sf2
> prog 0 0 // load instrument 0 (Acoustic Grand Piano) into channel 0
> noteon 0 60 100 // play note 60, middle-C

So where I got stuck is that I need a new midi command that will first change the bank to, say, 127 and then play the note.

I was looking at the fluidsynth spec and the midi-bank-select instructions which seems to be how you go about switching to other banks. Here's what I came up with:

» fluidsynth ./Musyng.sf2
> cc 0 0 127 // select bank 127
> cc 0 32 1 // load into current bank
> prog 0 2 // load instrument 2 (Synthkorg, but could be any instrument you want in that bank) into channel 0
> noteon 0 60 100 // play note 60, middle-C, `KorgKit2-60-78R`

So I think if I modify my script slightly I can get percussion to render. The question then becomes how and where to map the instruments. We could do something like map the Standard kit (001 in bank 127) into Acoustic Grand Piano (000 in General MIDI). Unless there is a particular drum kit you're looking to use?

fheyen commented 3 years ago

When the percussion.json file was still available, I used it (just like the other fonts) with danigb/sound-fontplayer and it just worked. So at least for those who use soundfont-player it would work without mapping to banks. I now host all files myself, but since all the other fonts are available in this repository it certainly would be nice to have percussion as well, even if it is not mapped correctly. If there are multiple reasonable ways to map them, you could always resort to 'why not both', i.e. host both and and let the user chose which one to use.

supersational commented 3 years ago

@gleitz my bad, totally missed your previous question!

Bank 128 is not the source of drums but mainly sound effects and other misc sounds The drums actually come from MIDI channel 10 - so I changed the generation script something like this:

def generate_midi(program, note_value, file)
  # rest of code unchanged
  # pseudocode since I don't have the file to hand
  if program == 254:
    events.add(ChannelChange(10))
    events.add(ProgramChange(0))
end
supersational commented 3 years ago

actually let me double check the above since it might apply differently to soundfonts than how I expect - I'll see if I've still got the exact generation code, probably more useful!

Maxiiimus commented 3 years ago

Hey There!

First, I want to preface everything by saying I'm not a musician and what I'm working on is a hobby and has been a lot of fun and I've learned a lot about MIDI along the way.

A quick overview of my project. I have a NodeJS app running on a Raspberry Pi 4 that uses MidiPlayerJS to read MIDI files. I then take the MIDI events to drive playing keys on an antique player piano (driven by solenoid valves to control the pneumatics). That is all working well for solo piano MIDI files. For the interface, I have a mobile web app served by the Pi on my local network.

Now I'm playing around with adding the ability to play non-piano channels to broaden what MIDI files can be played (and because, why not? :). To do this, I'm sending MIDI events to a page that plays the notes using the sound-fontplayer library. It's been simple for most instruments in files I've tried. First, I scan the file for all the instruments in the channels. I load them by index number on the client. Then when I receive an event, just play it (or stop it for "note off" events) on the corresponding instrument. Again, works pretty well running on my laptop (I haven't yet tried the SoundFont library functionality on the Pi). The exception is drums.

For drums, I handle channel 10 differently. For now, I'm loading a local version of percussion-mp3.js I pulled down from this PR. I might be doing something wrong here, but the drum notes sound strange. Here's a video with a sample of what I mean: https://www.youtube.com/watch?v=85GznfPZwp4. The hi hat sounds "chirpy".

As for which particular drum kit to use, I'm not sure what the options are. Mostly, I was thinking there is a "common" kit to map to the specification here.

Thank you for the quick responses and for putting this together and sharing it! -Matt

supersational commented 3 years ago

Ok so the above code should be:

if program == 254:
  # channel is 9 due to zero-indexing
  track.events << NoteOn.new(9, note_value, VELOCITY, 0) # channel, note, velocity, delta
  track.events << NoteOff.new(9, note_value, VELOCITY, DURATION)
else:
  #normal note

I'll put in a pull request soon with the generation code - however there are actually different drums on channel 10 which can be accessed using program-change message, such as the 808 and orchestral in fatboy which would be great to have alongside the standard kit!

There are about 24 different kits and it's going to need program-change codes specific to each soundfont (since it's not 0,1,2,3 more like 0,24,25,32 etc.) , so to add them I'll just need to have maybe an extra json file to tell the generator which extra drumkits exists and what to call them (alternatively could parse the soundfont and check but that's more effort) - anyway I think the question here will be how to access different drumkits via MIDI https://www.midi.org/forum/1161-how-do-i-access-general-midi-s-alternate-drum-kit-sounds

One thing to note is that with drums a lot of the notes are empty so shouldn't be rendered - will also need to remove those to make it a quicker download.

gleitz commented 3 years ago

Thanks for that info! Happy to accept a PR with the updated generation script.

Maxiiimus commented 3 years ago

Hi @supersational & @gleitz,

I just read through the above post on midi.org and also the spec (General_MIDI_Level_2_07-2-6_1.2a.pdf). It looks like there would be 9 different percussion sets defined there. Using that as a reference, we could soundfont files with program changes for 1, 9, 17, 25, 26, 33, 41, 49, 57. (I assume these would all be -1 to index).

Could we have a .json file that assumes the standard set for most. Something like:

[
  "standard_set",
  "standard_set",
... (6 more "standard_set")
  "standard_set",
  "room_set",
... 
  "power_set",
... 
   "electronic_set",
... 
   "analog_set",
... 
   "jazz_set",
... 
   "brush_set"
... 
    "orchestra_set",
... 
    "sfx_set",
... (more "standard_set")
]

Most of the notes in the sets other than standard will be the same as standard or will be empty (as you said above). Then, when there's a program change to channel 10, load the soundfonts from these instead of from the other .json file based on the value (which I seem to usually see as 0 for the "standard_set"). You mention 24 kits, so perhaps there are more that can be added?

I haven't looked at how these are generated or cloned this repo, but just keeping the conversation going. :)

Thanks!

baparham commented 1 year ago

Hey all, is this still on the table or being worked by anyone? I'd also love to see some percussion kits added as soundfonts so we can take advantage of the kits in these original sf2s.

What's the current status?