csound / manual

Csound Reference Manual (English)
Other
46 stars 29 forks source link

new example for scanu #534

Closed tjingboem closed 1 month ago

tjingboem commented 3 years ago

we could add a link to http://www.csounds.com/scanned/toot/index.html under the article of Steven Yi

this could be the example- all about different rate settings....

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac          -d     ;;;RT audio I/O and don't display waves
; For Non-realtime ouput leave only the line below:
; -o scanu.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

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

    instr 1

a0  = 0          ; no external input
;   scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
    scanu 1,     p6,    6,       2,       3,     4,        5,       2,     .1,    .1,     -.02,  .1,    .5,     0,    0,        a0,  1,     2
;ar scans kamp,      kfreq,      ifntraj, id
a1  scans ampdb(p4), cpspch(p5), 7,       2
a1  *= 0.00006                                        ; lower amplitude &
a1  dcblock2  a1                                      ; remove DC offset
outs a1, a1
    endin

</CsInstruments>
<CsScore>
f1 0 128 7 0 64 1 64 0                             ; Initial condition
f2 0 128 -7 1 128 1                                 ; Masses
f3 0 16384 -23 "string-128.matrix"          ; Spring matrices
f4  0 128 -7 0 128 2                                ; Centering force
f5 0 128 -7 1 128 1                                 ; Damping
f6 0 128 -7 0 128 0                                 ; Initial velocity
f7 0 128 -5 .001 128 128                        ; Trajectories

i1 0 3 86 6.00 0.001 ; fast updates of the mass state
i1 5 7 86 6.00 0.005 ; slower updating...
i1 15 10 86 6.00 0.1 ; ..and updating much slower still

e
</CsScore>
</CsoundSynthesizer>
csounder commented 3 years ago

need for such extreme amplitude scaling seems to be unusual - maybe something in the settings could compensate for this?

- dB

Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division

On Sun, Apr 25, 2021 at 9:50 AM Menno Knevel @.***> wrote:

; Select audio/midi flags here according to platform ; Audio out Audio in No messages -odac -d ;;;RT audio I/O and don't display waves ; For Non-realtime ouput leave only the line below: ; -o scanu.wav -W ;;; for file output any platform sr = 44100 ksmps = 32 nchnls = 2 0dbfs = 1 instr 1 a0 = 0 ; scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id scanu 1, p6, 6, 2, 3, 4, 5, 2, .1, .1, -.02, .1, .5, 0, 0, a0, 1, 2 ;ar scans kamp, kfreq, ifntraj, id a1 scans ampdb(p4), cpspch(p5), 7, 2 a1 *= 0.00006 ; lower amplitude & a1 dcblock2 a1 ; remove DC offset outs a1, a1 endin f1 0 128 7 0 64 1 64 0 ; Initial condition f2 0 128 -7 1 128 1 ; Masses f3 0 16384 -23 "string-128.matrix" ; Spring matrices f4 0 128 -7 0 128 2 ; Centering force f5 0 128 -7 1 128 1 ; Damping f6 0 128 -7 0 128 0 ; Initial velocity f7 0 128 -5 .001 128 128 ; Trajectories i1 0 3 86 6.00 0.001 ; fast updates of of the mass state i1 5 7 86 6.00 0.005 ; slower i1 15 10 86 6.00 0.1 ; ..and updating much slower still e

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9tYW51YWwvaXNzdWVzLzUzNA==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=VWJHNGdvSnhPL1pZOTk4bFd3N3lBRlZQeU1vbG1uVUZqTE5tOGdxMmFzRT0=&h=25bcbcb354b64421b13cc0410b7357fd, or unsubscribe https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL25vdGlmaWNhdGlvbnMvdW5zdWJzY3JpYmUtYXV0aC9BQUxXWUZTNUdIWEdWVU9NT1hNQ0NOM1RLUU1aRkFOQ05GU000M1JKVzRaUQ==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=UW5VNlZuWVpHRmZhMUJwMUdaYktIVFVzNDhLd3JaMmxERjluU2xycUJmWT0=&h=25bcbcb354b64421b13cc0410b7357fd .

csounder commented 3 years ago

menno,

I fine-tuned a few more of the functions and levels so that things would evolve more smoothly, last a little longer, and all be using the same ranges. Maybe you might want to use this version in the manual?

; Select audio/midi flags here according to platform ; Audio out Audio in No messages -odac -d ;;;RT audio I/O and don't display waves ; For Non-realtime ouput leave only the line below: ; -o scanu.wav -W ;;; for file output any platform sr = 44100 ksmps = 32 nchnls = 2 0dbfs = 1 instr 1 a0 = 0 ; scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id scanu 1, p6, 6, 2, 3, 4, 5, 2, .1, .1, -.02, .1, .5, 0, 0, a0, 0, 2 ; scans kamp, kfreq, ifntraj, id a1 scans ampdb(p4), cpspch(p5), 7, 2 a1 *= 0.00006 ; lower amplitude & a1 dcblock2 a1 ; remove DC offset outs a1, a1 endin f1 0 128 -7 0 64 1 64 0 ; Initial condition f2 0 128 -7 1 64 .45 64 1 ; Masses f3 0 16384 -23 "string-128.matrix" ; Spring matrices f4 0 128 -7 0 64 1 64 0 ; Centering force f5 0 128 -7 0 64 1 64 0 ; Damping f6 0 128 -7 0 128 0 ; Initial velocity f7 0 128 -7 0 64 127 64 0 ; Trajectories i1 00 04 86 6.00 0.001 ; fast updates of of the mass state i1 05 07 86 6.00 0.006 ; ... slower updates i1 13 14 86 6.00 0.020 ; ... much slower updates i1 28 20 86 6.00 0.060 ; ... and updating much slower still e

- dB

Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division

On Sun, Apr 25, 2021 at 9:50 AM Menno Knevel @.***> wrote:

; Select audio/midi flags here according to platform ; Audio out Audio in No messages -odac -d ;;;RT audio I/O and don't display waves ; For Non-realtime ouput leave only the line below: ; -o scanu.wav -W ;;; for file output any platform sr = 44100 ksmps = 32 nchnls = 2 0dbfs = 1 instr 1 a0 = 0 ; scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id scanu 1, p6, 6, 2, 3, 4, 5, 2, .1, .1, -.02, .1, .5, 0, 0, a0, 1, 2 ;ar scans kamp, kfreq, ifntraj, id a1 scans ampdb(p4), cpspch(p5), 7, 2 a1 *= 0.00006 ; lower amplitude & a1 dcblock2 a1 ; remove DC offset outs a1, a1 endin f1 0 128 7 0 64 1 64 0 ; Initial condition f2 0 128 -7 1 128 1 ; Masses f3 0 16384 -23 "string-128.matrix" ; Spring matrices f4 0 128 -7 0 128 2 ; Centering force f5 0 128 -7 1 128 1 ; Damping f6 0 128 -7 0 128 0 ; Initial velocity f7 0 128 -5 .001 128 128 ; Trajectories i1 0 3 86 6.00 0.001 ; fast updates of of the mass state i1 5 7 86 6.00 0.005 ; slower i1 15 10 86 6.00 0.1 ; ..and updating much slower still e

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9tYW51YWwvaXNzdWVzLzUzNA==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=VWJHNGdvSnhPL1pZOTk4bFd3N3lBRlZQeU1vbG1uVUZqTE5tOGdxMmFzRT0=&h=25bcbcb354b64421b13cc0410b7357fd, or unsubscribe https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL25vdGlmaWNhdGlvbnMvdW5zdWJzY3JpYmUtYXV0aC9BQUxXWUZTNUdIWEdWVU9NT1hNQ0NOM1RLUU1aRkFOQ05GU000M1JKVzRaUQ==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=UW5VNlZuWVpHRmZhMUJwMUdaYktIVFVzNDhLd3JaMmxERjluU2xycUJmWT0=&h=25bcbcb354b64421b13cc0410b7357fd .

tjingboem commented 3 years ago

Yes, that is more interesting...great! Certainly an addition, more musical,transparent and fun. Also nice to see the display option (idisp = 0) used here, instead of the -d in the command line i had to put in.

I had to turn the amplitude down due to the 'modern' 0dbfs = 1 setting- the settings the Csound Manual Team agreed upon.

Now that, in this example, there is less damping, i have set the final note to 2 minutes! (it has to stop at one point!)

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac             ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o scanu.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

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

    instr 1

a0  = 0          ; no external input
;   scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id
    scanu 1,     p6,    6,       2,       3,     4,        5,       2,     .1,    .1,     -.02,  .1,    .5,     0,    0,        a0,  0,     2
;ar scans kamp,      kfreq,      ifntraj, id
a1  scans ampdb(p4), cpspch(p5), 7,       2
a1  *= 0.00006                                        ; lower amplitude due to 0dbfs  = 1
a1  dcblock2  a1                                      ; remove DC offset
outs a1, a1
    endin

</CsInstruments>
<CsScore>
f1 0 128 7 0 64 1 64 0                               ; Initial condition
f2 0 128 -7 1 64 .45 64 1                                ; Masses
f3 0 16384 -23 "string-128.matrix"             ; Spring matrices
f4 0 128 -7 0 64 1 64 0                                ; Centering force
f5 0 128 -7 0 64 1 64 0                                ; Damping
f6 0 128 -7 0 128 0                                ; Initial velocity
f7 0 128 -7 0 64 127 64 0                       ; Trajectories

i1 0 8 86 6.00 0.001  ; fast updates of the mass state
i1 8 10 86 6.00 0.005 ; slower updating...
i1 18 120 86 6.00 0.1 ; ..and updating much slower still

e
</CsScore>
</CsoundSynthesizer>
csounder commented 3 years ago

Great. Actually john and I have discovered that there is something strange going on under the hood with the irate parameter and he is working to optimize the code

Dr. Richard Boulanger Professor Electronic Production and Design Berklee College of Music

On Apr 25, 2021, at 11:36 AM, Menno Knevel @.***> wrote:

 Yes, that is more interesting...great! Certainly an addition, more musical,transparent and fun. Also nice to see the display option (idisp = 0) used here, instead of the -d in the command line i had to put in.

I had to turn the amplitude down due to the 'modern' 0dbfs = 1 setting- the settings the Csound Manual Team agreed upon.

Now that, in this example, there is less damping, i have set the final note to 2 minutes! (it has to stop at one point!)

; Select audio/midi flags here according to platform ; Audio out Audio in No messages -odac ;;;RT audio I/O ; For Non-realtime ouput leave only the line below: ; -o scanu.wav -W ;;; for file output any platform sr = 44100 ksmps = 32 nchnls = 2 0dbfs = 1 instr 1 a0 = 0 ; no external input ; scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id scanu 1, p6, 6, 2, 3, 4, 5, 2, .1, .1, -.02, .1, .5, 0, 0, a0, 0, 2 ;ar scans kamp, kfreq, ifntraj, id a1 scans ampdb(p4), cpspch(p5), 7, 2 a1 *= 0.00006 ; lower amplitude due to 0dbfs = 1 a1 dcblock2 a1 ; remove DC offset outs a1, a1 endin f1 0 128 7 0 64 1 64 0 ; Initial condition f2 0 128 -7 1 64 .45 64 1 ; Masses f3 0 16384 -23 "string-128.matrix" ; Spring matrices f4 0 128 -7 0 64 1 64 0 ; Centering force f5 0 128 -7 0 64 1 64 0 ; Damping f6 0 128 -7 0 128 0 ; Initial velocity f7 0 128 -7 0 64 127 64 0 ; Trajectories i1 0 8 86 6.00 0.001 ; fast updates of the mass state i1 8 10 86 6.00 0.005 ; slower updating... i1 18 120 86 6.00 0.1 ; ..and updating much slower still e

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

AsterixMusic commented 3 years ago

There are "jumps" at "irate" that can result as audible clicks, I don't know if they are part of the sound or "bugs"...

Screenshot 2021-04-25 at 10 39 34
csounder commented 3 years ago

At certain rates these are quite annoying. I always thought it had to do with the ksmps and interpolation of the surface. But, maybe it could be related to this irate bug/issue that john and I are investigating. This is why I search for a sweet spot when setting the rate!

Dr. Richard Boulanger Professor Electronic Production and Design Berklee College of Music

On Apr 25, 2021, at 2:00 PM, Stefano Cucchi @.***> wrote:

 There are "jumps" at "irate" that can result as audible clicks, I don't know if they are part of the sound or "bugs"...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

tjingboem commented 3 years ago

The changes by John from 3 May seem to really improve the sound quality of the scanu example above! I will do more testing, but it sounds much cleaner...

csounder commented 3 years ago

Yes. There are a few more things that we are working on, but for sure this eliminated the 'pulsing' with slower irates.

currently, we are looking into a problem associated with kPos and kStrenth

Also, were you aware that:

a negative value for the initial condition (meaning the hammer shape) caused the surface to be plucked from the center and to ignore upPluck and downPluck

Also, were you aware that: the two pluck locations (the parms prior to kPos and kStrenghth) are for an upPluckPosition and a downPluckPosition (and that they only work if the init (surface initial condition - (or 'hammer') is a negative number

And, you might agree with me that the idea of a 'hammer' doesn't really make sense if your have a matrix that creates a three dimensional surface? I am not sure, but I think that there might be a better metaphor - (like a mold) because it is actually an initial surface contour prior to excitation

As much as I know about scanned, I too am learning many new things.

I have attached our testing instrument for you to explore and consider - with some of my comments

====

nchnls = 2 ksmps = 32 instr 1 icondfn = p7 imasf = p8 ; AUDIO INJECTION/EXCITATION a0 = 0 ; no excitation from audio input ; a0, a1 ins ; a0 = (a0+a1)/32000 ; Arguments FROM MANUAL - need to rename these so that they are more intuitive and accurate as to what they are and do! ; scanu init, irate,ifnvel,ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id ; kline linseg 1, p3/2, 0, p3/2, 1 ; uncomment and assign - for testing k-parameters ; Arguments Better Names - need to rename these so that they are more intuitive and accurate as to what they are and do! ; ( what is ivelf? ) ; does kpos and kstrength actually work? (when do they work ?) - I always thought of them as strumming or stroking the surface ; Note: if initHammer is a negative number, the surface is plucked in the middle ; scanu initHammer, scanRate/updateRate, ivelf(?), imassf, iConnectionMatrx, icntrf, idampf, kmassf, kstiffness, kcntr, kdamp, iUPplkpos, iDowNplkpos, kpos, kstrngth, ain, disp, id ; DEFAULT VALUES COMMENTED OUT ; scanu icondfn, .01, 6, imasf, 3, 4, 5, 2, .2, .2, .05, .1, .5, .5, 0, a0, 1, 1 ; THESE SETTINGS OF irate (used to cause pulsing every 250ms (note .25 for irate) ((FIXED)) ; scanu -1111, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 0, 0, a0, 1, 1 ; no pulsing ; scanu 1111, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 0, 0, a0, 1, 1 ; no pulsing ; scanu -(icondfn), .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 0, 0, a0, 1, 1 ; no pulsing ; scanu icondfn, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 0, 0, a0, 1, 1 ; no pulsing ; BUT: THESE SETTINGS OF kPosition and kStrength (still cause pulsing every 250ms (note .25 for irate) scanu -1111, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 1, 1, a0, 1, 1 ; pulsing ; scanu 1111, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 1, 1, a0, 1, 1 ; pulsing ; scanu -(icondfn), .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 1, 1, a0, 1, 1 ; pulsing ; scanu icondfn, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 1, 1, a0, 1, 1 ; pulsing ; scans kamp, kfreq, itrj, id, [iorder] a1 scans ampdb(p4), cpspch(p5), 7, 1 a1 dcblock a1 outs a1, a1 endin ; Initial Condition/State f1 0 128 7 0 60 0 2 1 2 0 60 0 ; Hammer = pluck up in the middle f11 0 128 7 0 30 0 2 1 2 0 30 0 30 0 2 -1 2 0 30 0 ; Hammer = pluck up & down f111 0 128 10 1 0 0 0 1 0 0 0 1 ; Hammer = pseudo-pulse f1111 0 128 10 1 ; Hammer = sine wave f11111 0 128 7 0 60 2 2 -2 2 2 60 0 ; Hammer = ramp up to pluck down in the middle ; Initial Masses f2 0 128 -7 4.0 128 4.0 ; straight line 100% f22 0 128 -7 4.3 128 3.1 ; light to heavy f222 0 128 -7 3.0 128 5.1 ; heavy to light ; Spring matrix f3 0 16384 -23 "128-stringcircular" ; Centering force ;f4 0 128 -7 1 128 1 f4 0 128 -7 0 64 2 64 0 ; Damping f5 0 128 -7 1 128 1 ; Initial velocity f6 0 128 -7 1 128 0 ; Trajectory f7 0 128 -7 0 128 128 ; Pluck f8 0 128 7 0 60 0 2 1 2 0 60 0 ; Sine wave f9 0 1024 10 1 ; INITIAL HAMMER/SURFACE & INITIAL MASS STUDY i1 0 3 50 7.00 1 11 2 i1 + . 50 7.07 1 11 22 i1 + 5 50 8.00 1 11 222 i1 + 3 50 7.00 1 111 2 i1 + . 50 7.07 1 111 22 i1 + 5 50 8.00 1 111 222 i1 + 3 50 7.00 1 1111 2 i1 + . 50 7.07 1 1111 22 i1 + 5 50 8.00 1 1111 222 i1 + 3 50 7.00 1 11111 2 i1 + . 50 7.07 1 11111 22 i1 + 7 50 8.00 1 11111 222 e

- dB

Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division

On Mon, May 3, 2021 at 2:26 PM Menno Knevel @.***> wrote:

The changes by John from 3 May seem to really improve the sound quality of the scanu example above! I will do more testing, but it sounds much cleaner...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9tYW51YWwvaXNzdWVzLzUzNCNpc3N1ZWNvbW1lbnQtODMxNDQ0NTI0&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=NEZOVjZwajEya0J5cnRYaFhoYUM5dHZLSDljTk9hZTZrazlmYmErU1RHTT0=&h=c214b5a2dafc49f3acab6b1aa4ac08c4, or unsubscribe https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL25vdGlmaWNhdGlvbnMvdW5zdWJzY3JpYmUtYXV0aC9BQUxXWUZYTFNVNUQ1RkJLUVpWSU5OTFRMM1REVkFOQ05GU000M1JKVzRaUQ==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=SDBpQk50SThUQ21EYmtIUDQ5MkN5bnQ3eDZEM0NEbjRQbC9tV0kzcUM4az0=&h=c214b5a2dafc49f3acab6b1aa4ac08c4 .

csounder commented 3 years ago

Note also - that ifnstif - is not a stiffness function at all - it is the connection matrix - there is a kstif parameter, which adjusts the stiffness of the springs from a controller or over time - to me these are 'push' variables - where you are pushing on the evolving surface - here and there

- dB

Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division

On Mon, May 3, 2021 at 2:50 PM Dr. Richard Boulanger @.***> wrote:

Yes. There are a few more things that we are working on, but for sure this eliminated the 'pulsing' with slower irates.

  • the sweet spot was always .01, but it has never been tied to krate.

currently, we are looking into a problem associated with kPos and kStrenth

  • when you set those to 1, the pulsing is back.

Also, were you aware that:

a negative value for the initial condition (meaning the hammer shape) caused the surface to be plucked from the center and to ignore upPluck and downPluck

Also, were you aware that: the two pluck locations (the parms prior to kPos and kStrenghth) are for an upPluckPosition and a downPluckPosition (and that they only work if the init (surface initial condition - (or 'hammer') is a negative number

And, you might agree with me that the idea of a 'hammer' doesn't really make sense if your have a matrix that creates a three dimensional surface? I am not sure, but I think that there might be a better metaphor - (like a mold) because it is actually an initial surface contour prior to excitation

As much as I know about scanned, I too am learning many new things.

I have attached our testing instrument for you to explore and consider - with some of my comments

====

nchnls = 2 ksmps = 32 instr 1 icondfn = p7 imasf = p8 ; AUDIO INJECTION/EXCITATION a0 = 0 ; no excitation from audio input ; a0, a1 ins ; a0 = (a0+a1)/32000 ; Arguments FROM MANUAL - need to rename these so that they are more intuitive and accurate as to what they are and do! ; scanu init, irate,ifnvel,ifnmass, ifnstif, ifncentr, ifndamp, kmass, kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id ; kline linseg 1, p3/2, 0, p3/2, 1 ; uncomment and assign - for testing k-parameters ; Arguments Better Names - need to rename these so that they are more intuitive and accurate as to what they are and do! ; ( what is ivelf? ) ; does kpos and kstrength actually work? (when do they work ?) - I always thought of them as strumming or stroking the surface ; Note: if initHammer is a negative number, the surface is plucked in the middle ; scanu initHammer, scanRate/updateRate, ivelf(?), imassf, iConnectionMatrx, icntrf, idampf, kmassf, kstiffness, kcntr, kdamp, iUPplkpos, iDowNplkpos, kpos, kstrngth, ain, disp, id ; DEFAULT VALUES COMMENTED OUT ; scanu icondfn, .01, 6, imasf, 3, 4, 5, 2, .2, .2, .05, .1, .5, .5, 0, a0, 1, 1 ; THESE SETTINGS OF irate (used to cause pulsing every 250ms (note .25 for irate) ((FIXED)) ; scanu -1111, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 0, 0, a0, 1, 1 ; no pulsing ; scanu 1111, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 0, 0, a0, 1, 1 ; no pulsing ; scanu -(icondfn), .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 0, 0, a0, 1, 1 ; no pulsing ; scanu icondfn, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 0, 0, a0, 1, 1 ; no pulsing ; BUT: THESE SETTINGS OF kPosition and kStrength (still cause pulsing every 250ms (note .25 for irate) scanu -1111, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 1, 1, a0, 1, 1 ; pulsing ; scanu 1111, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 1, 1, a0, 1, 1 ; pulsing ; scanu -(icondfn), .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 1, 1, a0, 1, 1 ; pulsing ; scanu icondfn, .25, 6, imasf, 3, 4, 5, 2, .3, .3, .06, .3, .7, 1, 1, a0, 1, 1 ; pulsing ; scans kamp, kfreq, itrj, id, [iorder] a1 scans ampdb(p4), cpspch(p5), 7, 1 a1 dcblock a1 outs a1, a1 endin ; Initial Condition/State f1 0 128 7 0 60 0 2 1 2 0 60 0 ; Hammer = pluck up in the middle f11 0 128 7 0 30 0 2 1 2 0 30 0 30 0 2 -1 2 0 30 0 ; Hammer = pluck up & down f111 0 128 10 1 0 0 0 1 0 0 0 1 ; Hammer = pseudo-pulse f1111 0 128 10 1 ; Hammer = sine wave f11111 0 128 7 0 60 2 2 -2 2 2 60 0 ; Hammer = ramp up to pluck down in the middle ; Initial Masses f2 0 128 -7 4.0 128 4.0 ; straight line 100% f22 0 128 -7 4.3 128 3.1 ; light to heavy f222 0 128 -7 3.0 128 5.1 ; heavy to light ; Spring matrix f3 0 16384 -23 "128-stringcircular" ; Centering force ;f4 0 128 -7 1 128 1 f4 0 128 -7 0 64 2 64 0 ; Damping f5 0 128 -7 1 128 1 ; Initial velocity f6 0 128 -7 1 128 0 ; Trajectory f7 0 128 -7 0 128 128 ; Pluck f8 0 128 7 0 60 0 2 1 2 0 60 0 ; Sine wave f9 0 1024 10 1 ; INITIAL HAMMER/SURFACE & INITIAL MASS STUDY i1 0 3 50 7.00 1 11 2 i1 + . 50 7.07 1 11 22 i1 + 5 50 8.00 1 11 222 i1 + 3 50 7.00 1 111 2 i1 + . 50 7.07 1 111 22 i1 + 5 50 8.00 1 111 222 i1 + 3 50 7.00 1 1111 2 i1 + . 50 7.07 1 1111 22 i1 + 5 50 8.00 1 1111 222 i1 + 3 50 7.00 1 11111 2 i1 + . 50 7.07 1 11111 22 i1 + 7 50 8.00 1 11111 222 e

- dB

Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division

On Mon, May 3, 2021 at 2:26 PM Menno Knevel @.***> wrote:

The changes by John from 3 May seem to really improve the sound quality of the scanu example above! I will do more testing, but it sounds much cleaner...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9tYW51YWwvaXNzdWVzLzUzNCNpc3N1ZWNvbW1lbnQtODMxNDQ0NTI0&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=NEZOVjZwajEya0J5cnRYaFhoYUM5dHZLSDljTk9hZTZrazlmYmErU1RHTT0=&h=c214b5a2dafc49f3acab6b1aa4ac08c4, or unsubscribe https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL25vdGlmaWNhdGlvbnMvdW5zdWJzY3JpYmUtYXV0aC9BQUxXWUZYTFNVNUQ1RkJLUVpWSU5OTFRMM1REVkFOQ05GU000M1JKVzRaUQ==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=SDBpQk50SThUQ21EYmtIUDQ5MkN5bnQ3eDZEM0NEbjRQbC9tV0kzcUM4az0=&h=c214b5a2dafc49f3acab6b1aa4ac08c4 .

tjingboem commented 3 years ago

There are a few more things that we are working on, but for sure this eliminated the 'pulsing' with slower irates. the sweet spot was always .01, but it has never been tied to krate.

an important accomplishment, makes me want to explore Scanned further...

currently, we are looking into a problem associated with kPos and kStrenth when you set those to 1, the pulsing is back.

yes, giving kstrength a value > 0 and the pulsing is back, i notice it here for sure. It also is responsible for a lot of amplitude...would it be a good idea to compensate for this amplitude difference in the code itself? If kstrength is related to the total amplitude control, my chandelier won't fall off the ceiling anymore, it would be more user-friendly.

Even when i use a sine as initial wave form to excite AND setting ksmps to 1, i get ugly transient pulse clicks: Screenshot from 2021-05-04 11-28-15

I will continue experimenting to get a feel for the other parameters and demystify the opcode some more :)

csounder commented 3 years ago

Yes. ;-) It is still a csound opcide that comes with a warning message! Or should

Dr. Richard Boulanger Professor Electronic Production and Design Berklee College of Music

On May 4, 2021, at 5:30 AM, Menno Knevel @.***> wrote:

 There are a few more things that we are working on, but for sure this eliminated the 'pulsing' with slower irates. the sweet spot was always .01, but it has never been tied to krate.

an important accomplishment, makes me want to explore Scanned further...

currently, we are looking into a problem associated with kPos and kStrenth when you set those to 1, the pulsing is back.

yes, giving kstrength a value > 0 and the pulsing is back, i notice it here for sure. It also is responsible for a lot of amplitude...would it be a good idea to compensate for this amplitude difference in the code itself? If kstrength is related to the total amplitude control, my chandelier won't fall off the ceiling anymore, it would be more user-friendly.

Even when i use a sine as initial wave form to excite AND setting ksmps to 1, i get ugly transient pulse clicks:

I will continue experimenting to get a feel for the other parameters and demystify the opcode some more :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

tjingboem commented 3 years ago

Also, were you aware that:

a negative value for the initial condition (meaning the hammer shape) caused the surface to be plucked from the center and to ignore upPluck and downPluck

Also, were you aware that: the two pluck locations (the parms prior to kPos and kStrenghth) are for an upPluckPosition and a downPluckPosition (and that they only work if the init (surface initial condition - (or 'hammer') is a negative number

i was not aware of that, text the user wants to see on the manual page of scanu for sure...with some images perhaps to show what happens with the pluck position upPluck/downPluck versus center Pluck, and the according settings

csounder commented 3 years ago

Yes. This was total 'news' to me last Friday - and I did make some examples where you could clearly see the up and down plucks

- dB

Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division

On Tue, May 4, 2021 at 8:29 AM Menno Knevel @.***> wrote:

Also, were you aware that:

a negative value for the initial condition (meaning the hammer shape) caused the surface to be plucked from the center and to ignore upPluck and downPluck

Also, were you aware that: the two pluck locations (the parms prior to kPos and kStrenghth) are for an upPluckPosition and a downPluckPosition (and that they only work if the init (surface initial condition - (or 'hammer') is a negative number

i was not aware of that, text to want to see on the manual page of scanu for sure...with some images perhaps to show what happens with the pluck position upPluck/downPluck versus center Pluck, and the according settings

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9tYW51YWwvaXNzdWVzLzUzNCNpc3N1ZWNvbW1lbnQtODMxOTA0MjY4&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=U3pMWTJYTForc1B3V3BRd2U0UHNRNjZhSjlqaXlyQjRYbFM1NHR2akVPZz0=&h=9c3a9f92e47344e1bc7362d3f51c9385, or unsubscribe https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL25vdGlmaWNhdGlvbnMvdW5zdWJzY3JpYmUtYXV0aC9BQUxXWUZYNUhaQ1BDRkpWVE9JQ1A0M1RMN1NFQkFOQ05GU000M1JKVzRaUQ==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=Y1pWcThyZFUvcm44ckVXMFBtUS9lcytReXFIY0lDVEhUTTlOWjRwSEdMTT0=&h=9c3a9f92e47344e1bc7362d3f51c9385 .

tjingboem commented 3 years ago

part of re-examine all Scanned Synthesis examples #535

tjingboem commented 1 month ago

closing this one all relevant information learned here is copied over to improve and extend all Scanned Synthesis examples #757

csounder commented 1 month ago

wonderful. and so so so much clearer. a ton of great and important work. thanks.

- Dr.B

Dr. Richard Boulanger

Professor

Electronic Production and Design

Berklee College of Music

Professional Writing & Technology Division

On Mon, Sep 16, 2024 at 10:29 AM Menno Knevel @.***> wrote:

Closed #534 https://github.com/csound/manual/issues/534 as completed.

— Reply to this email directly, view it on GitHub https://github.com/csound/manual/issues/534#event-14268797389, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALWYFRPYK5H7FGZJJDRQ5DZW2JFHAVCNFSM6AAAAABOIY4J4GVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGI3DQNZZG4ZTQOI . You are receiving this because you commented.Message ID: @.***>