Csound Csound-dev Csound-tekno Search About

[Csnd] Microtonal soundfont playback

Date2007-11-27 14:42
From"Chuckk Hubbard"
Subject[Csnd] Microtonal soundfont playback
AttachmentsNone  

Date2007-11-27 18:06
FromBill Alves
Subject[Csnd] Re: Microtonal soundfont playback
Re: [Csnd] Microtonal soundfont playback
Hi Chuckk,

I used sfplay (because the fluidsynth opcodes didn't seem to work in MacCsound). It allows playing from an absolute cps. In this implementation, I had a global variable for the number of pitches per octave and a table with the corresponding ratios:

        instr 1
ivel            
veloc
inotenum  
notnum
ipreset          
=               i(gkpreset1)
ioct               
=               int(inotenum/giScaleSize)
ipchclass     
=               int(giScaleSize*(frac(inotenum/giScaleSize))+0.1)
iratio        
table           ipchclass,2
ifreq               
=               gipitchref*iratio*2^(ioct - 5)
al,ar            
sfplay          ivel, inotenum, 1, ifreq, ipreset, 1
                outs            al,ar
        endin


At 4:42 PM +0200 11/27/07, Chuckk Hubbard wrote:
I'd like to use samples from soundfonts microtonally:
normally this means cycling through MIDI channels, since each channel
can only have one pitchbend value.  Which means, for each note,
sending program change and pitch bend before noteon to the next
channel in the list.  I'm wondering what's the best way to load the
samples from the soundfont, but play them by cps instead of note
number.
Perhaps creating several FluidSynth engines, one for each instrument,
thus eliminating the need for program changes, while still having to
use pitch bend and different channels for each note?
Or loading the samples from the soundfont somehow to other sampling
opcodes, which can take cps instead of note number?
Or does some sample-playback opcode support both the soundfont format
and fractional MIDI note numbers?

Thanks.
-Chuckk

--
http://www.badmuthahubbard.com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


-- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^ Bill Alves                           The Claremont Colleges ^
^ Harvey Mudd College        URL: http://www2.hmc.edu/~alves/ ^
^ 301 Platt Blvd.                      (909)607-4170 (office) ^
^ Claremont CA 91711 USA                  (909)607-7600 (fax) ^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^