Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip initialization for original soundfont opcodes #1729

Open
tjingboem opened this issue Jul 22, 2023 · 2 comments
Open

skip initialization for original soundfont opcodes #1729

tjingboem opened this issue Jul 22, 2023 · 2 comments
Assignees

Comments

@tjingboem
Copy link
Member

tjingboem commented Jul 22, 2023

option to prohibit initialization for tied-note usage.

ar1, ar2 sfplay3 ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv]

I do think these "original" soundfont opcodes are still relevant as they allow for a different usage than the fluid opcodes. A tied notes option could be another one.

Here is a list of soundfont opcodes that do not have this option:

  • sfinstr3
  • sfinstr3m
  • sfinstr
  • sfinstrm
  • sfplay3
  • sfplay
  • sfplay3m
  • sfplaym
  • sflooper?????
@jpffitch jpffitch self-assigned this Aug 23, 2023
@tjingboem
Copy link
Member Author

tjingboem commented Aug 24, 2023

i have added sflooper as i presume this is part of sfont.c
This opcode is created later and i do see there is already a skip parameter.
Have to look into this....

@tjingboem
Copy link
Member Author

tjingboem commented Aug 24, 2023

The simple example where you hear the clicks:

<CsoundSynthesizer>
<CsOptions> 
-odac ;;;realtime audio out
</CsOptions> 
<CsInstruments>

sr  =   44100
ksmps   =   32
nchnls  =   2
0dbfs   =   1 

giSF	sfload	"/media/menno/datae/onderzoek/manualExamples/sf_GMbank.sf2" 
        sfplist giSF 
gipre	sfpreset 42, 0, giSF, 0 ; Cello


instr 1

ikey	= p4
ivel	= p5

iamp    = 0.000004                      ;scale amplitude down a lot, due to 0dbfs  = 1 
iamp    *= ivel 			         ;make velocity-dependent

aL, aR	sfplay3 ivel, ikey, iamp, p4, gipre, 1 
        outs aL, aR 

	endin

</CsInstruments>
<CsScore>
s
i1.1 0 -1 60 100 
i1.1 3 -1 80 <  
i1.1 6 -1 100 <   
i1.1 9 1 60 40  
s
i1.1 0 -1 60 100 
i1.1 3 -1 80 <  
i1.1 6 -1 100 <   
i1.1 9 1 60 40  
i1.2 0 1 80 100 
e
</CsScore>
</CsoundSynthesizer>

The score uses fractional instrument numbers. The first section only plays one and the same fractional instr, while the second uses another, additional independent fractional instr.

The SoundFont can be found in /manual/examples. The Cello program 42 bank 0 is chosen because it contains a loop, needed for the held notes (-1)

Because all of these opcodes are based on the same sfont.c, i reckon that this change affects all of them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants