That’s working fine here now. It’s all a matter of getting all the async stuff lined up properly.
Got my MIDI file player working now with Csound WASM, you can check it here
I think that what Steven and Hlodver have done really simplified the process. Converting old examples was not too difficult even when it involved more or less a total rewrite.
Prof. Victor Lazzarini
Maynooth University
Ireland
i have been messing about with this as well i have modified victor’s code a great deal actually to get it the way I use it (browser live coding/algorithmic stuff)
i did perhaps find an opcode bug though somewhere in the pitch to midi conversion, it’s off by a note if i send (.0, .02, .04, .05, .07, .09, .11) when switching octaves but if i send (60, 62, 64, 65, 67, 69, 71) it works fine
maybe you are thinking of a different code, this one from the midiplayer does not do any pitch to midi conversion. It just sends midi messages to an sf instrument. It’s an adaptation of the fluidcomplex.csd manual example made to work with sfplay.
Prof. Victor Lazzarini
Maynooth University
Ireland
i am aware, i more or less just used it as an example to learn how sfplay worked since fluid opcodes aren’t in wasm… i am actually passing schedule opcodes to it, pulling numbers from an array so p4 could be 60 (+12/-12) or 8.0 (+0.12/-0.12) but you would have to pass the pchtom opcode to it if you are using pch values. i think i have nailed it down to that opcode and not the array because if i put the same array through cpspch and a regular ol oscil it works fine.