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

errors in IterateRhythm generator #4

Open
tjingboem opened this issue Feb 10, 2021 · 9 comments
Open

errors in IterateRhythm generator #4

tjingboem opened this issue Feb 10, 2021 · 9 comments

Comments

@tjingboem
Copy link
Contributor

tjingboem commented Feb 10, 2021

i am getting re-acquainted with AthenaCL, and think i have found an error in the program.
i was unable to use any of these Rhythm ParameterObjects due to errors.

can you check please, if the following rhythms from the manual do work for you?

  • C.2.5. iterateRhythmGroup (irg)
  • C.2.6. iterateRhythmHold (irh)
  • C.2.7. iterateRhythmWindow (irw)

pi{auto}ti{w} :: tie
edit TI w
which parameter? (i,t,b,r,p,f,o,a,n,x,s,d): a
current amplitude: randomBeta, 0.4, 0.4, (constant, 0.7), (constant, 0.9)
new value: irw, ((l,((4,3,1),(4,3,1),(4,2,0),(8,1,1),(4,2,1),(4,2,1)),oc),(cs,(ru,1.5,4))), (bg,rc,(-3,6,-1,15)), oc
TIe ERROR: incorrect arguments: parameter lib error (genPmtrObjs: irw, None, ('irw', [['l', [[4, 3, 1], [4, 3, 1], [4, 2, 0], [8, 1, 1], [4, 2, 1], [4, 2, 1]], 'oc'], ['cs', ['ru', 1.5, 4]]], ['bg',
'rc', [-3, 6, -1, 15]], 'oc'))

It can be there is an error in the code...

@ales-tsurko
Copy link
Owner

ales-tsurko commented Feb 10, 2021

Actually, it looks like it doesn't work with any rhythm ParameterObject 🤔

UPD looks like it shouldn't work, as when I go around this error, I get:

TIe ERROR: only a generator ParameterObject can be used here.

So maybe the bug is about a wrong error type (i.e. it's not allowed to use rhythm ParameterObject there). The logic seems correct there. It just tries to find the ParameterObject in generators parameter objects store, while those you try to use are from the rhythm one. Given that, I bet generator ParameterObjects will work as expected.

Anyway the wrong error type is still a bug.

@ales-tsurko
Copy link
Owner

ales-tsurko commented Feb 10, 2021

So, yes. You can use only generator ParameterObjects there. That's because rhythm ParameterObjects produce only rhythm - pulses. They don't generate any values. You can use them inside generator ParameterObjects, for example, to produce some values for amplitude with specific rhythm. In your case you tried to assign a rhythm to the amplitude, but it knows nothing about values for the amplitude. You can use rhythm ParameterObject on its own for rhythm attribute though.

Still I'll keep this issue open, because the returned error type is wrong.

@tjingboem
Copy link
Contributor Author

tjingboem commented Feb 11, 2021

I found out it was user error, an error on my part...i found that when copying these very long commands from those 3 Rhythm PO i mentioned in my post, something goes wrong when i paste it in AthenaCL. They get scrambled.
As a solution, I first have to copy pieces of this command in a text file to get them on one line, then copy that and paste that in AthenaCL.
Then it works.
So i was having trouble copying and pasting....sorry for the fuzz...

About the Rhythm ParameterObjects:
The Rhythm ParameterObjects work only for when you want to change the rhythm of the Texture. So it only works when you want to change (r) in the Texture.

There are 3 sets of data generated, that concern this rhythm:

  1. time
  2. sustain (not quite clear to me yet, working on it...)
  3. accent
    Together they are responsible for the rhythm pulses of a Texture.
    This explains the 3 windows in the Rhythm ParameterObject group you see in the manual, whereas the Generator ParameterObject produces only 1 set.

So, this morning i tried to copy the iterateRhythmWindow command from the manual again, this time as one whole sentence.
And yes, the rhythm parameter was updated without problems.

I just have to watch out for the loooonnnggg command as they paste not always well in AthenaCL...

Here is the proof; first i change (r) with a shorter Rhythm ParameterObject command 'loop', then i change it to the very long one of the iterateRhythmWindow.

menno@mennoASUSZ170 ~ $ athenacl

athenaCL 2.0.0a15 (on linux via terminal)
Enter "cmd" to see all commands. For help enter "?".
Enter "c" for copyright, "w" for warranty, "r" for credits.

pi{}ti{} :: tin
name this texture: w
enter any instrument number: 1
provide number of auxiliary parameters: 0
TI w created.

pi{auto}ti{w} :: tiv
TI: w, TM: LineGroove, TC: 0, TT: TwelveEqual
pitchMode: pitchSpace, silenceMode: off, postMapMode: on
midiProgram: piano1
status: +, duration: ?--?
(i)nstrument 1 (csoundExternal: generic)
(t)ime range 00.0--20.0
(b)pm constant, 120
(r)hythm pulseTriple, (constant, 4), (basketGen, randomPermutate, (1,1,2,3)), (constant, 1), (constant, 0.75)
(p)ath auto
(C4)
20.00(s)
local (f)ield constant, 0
local (o)ctave constant, 0
(a)mplitude randomBeta, 0.4, 0.4, (constant, 0.7), (constant, 0.9)
pan(n)ing constant, 0.5
au(x)iliary none
texture (s)tatic
s0 parallelMotionList, (), 0.0
s1 pitchSelectorControl, randomPermutate
s2 levelFieldMonophonic, event
s3 levelOctaveMonophonic, event
texture (d)ynamic none

pi{auto}ti{w} :: tie
edit TI w
which parameter? (i,t,b,r,p,f,o,a,n,x,s,d): r
current rhythm: pulseTriple, (constant, 4), (basketGen, randomPermutate, (1,1,2,3)), (constant, 1), (constant, 0.75)
new value: l, ((3,1,1),(3,1,1),(8,1,1),(8,1,1),(8,3,1),(3,2,0)), oc
TI w: parameter rhythm updated.

pi{auto}ti{w} :: tiv
TI: w, TM: LineGroove, TC: 0, TT: TwelveEqual
pitchMode: pitchSpace, silenceMode: off, postMapMode: on
midiProgram: piano1
status: +, duration: ?--?
(i)nstrument 1 (csoundExternal: generic)
(t)ime range 00.0--20.0
(b)pm constant, 120
(r)hythm loop, ((3,1,+),(3,1,+),(8,1,+),(8,1,+),(8,3,+),(3,2,o)), orderedCyclic
(p)ath auto
(C4)
20.00(s)
local (f)ield constant, 0
local (o)ctave constant, 0
(a)mplitude randomBeta, 0.4, 0.4, (constant, 0.7), (constant, 0.9)
pan(n)ing constant, 0.5
au(x)iliary none
texture (s)tatic
s0 parallelMotionList, (), 0.0
s1 pitchSelectorControl, randomPermutate
s2 levelFieldMonophonic, event
s3 levelOctaveMonophonic, event
texture (d)ynamic none

pi{auto}ti{w} :: tie
edit TI w
which parameter? (i,t,b,r,p,f,o,a,n,x,s,d): r
current rhythm: loop, ((3,1,+),(3,1,+),(8,1,+),(8,1,+),(8,3,+),(3,2,o)), orderedCyclic
new value: irw,
TI w: parameter rhythm updated.

pi{auto}ti{w} :: ((l,((4,3,1),(4,3,1),(4,2,0),(8,1,1),(4,2,1),(4,2,1)),oc),(cs,(ru,1.5,4))), (bg,rc,(-
unknown command. enter "cmd" to see all commands.

pi{auto}ti{w} :: tie
edit TI w
which parameter? (i,t,b,r,p,f,o,a,n,x,s,d): r
current rhythm: iterateRhythmWindow, ((loop, ((4,3,+),(4,3,+),(4,2,o),(8,1,+),(4,2,+),(4,2,+)), orderedCyclic), (convertSecond, (randomUniform, (constant, 1.5), (constant, 4)))), (basketGen, randomChoice,
(-3,6,-1,15)), orderedCyclic
new value:

pi{auto}ti{w} :: tiv
TI: w, TM: LineGroove, TC: 0, TT: TwelveEqual
pitchMode: pitchSpace, silenceMode: off, postMapMode: on
midiProgram: piano1
status: +, duration: ?--?
(i)nstrument 1 (csoundExternal: generic)
(t)ime range 00.0--20.0
(b)pm constant, 120
(r)hythm iterateRhythmWindow, ((loop, ((4,3,+),(4,3,+),(4,2,o),(8,1,+),(4,2,+),(4,2,+)), orderedCyclic), (convertSecond, (randomUniform, (constant, 1.5), (constant, 4)))), (basketGen, randomChoice,
(-3,6,-1,15)), orderedCyclic
(p)ath auto
(C4)
20.00(s)
local (f)ield constant, 0
local (o)ctave constant, 0
(a)mplitude randomBeta, 0.4, 0.4, (constant, 0.7), (constant, 0.9)
pan(n)ing constant, 0.5
au(x)iliary none
texture (s)tatic
s0 parallelMotionList, (), 0.0
s1 pitchSelectorControl, randomPermutate
s2 levelFieldMonophonic, event
s3 levelOctaveMonophonic, event
texture (d)ynamic none

pi{auto}ti{w} ::


i am astonished to see how well organized AthenaCL is, but i am having a hard time to understand the system.
But i think it is well worth it, it produces great results!

@tjingboem
Copy link
Contributor Author

well, i tried again to get the 3 IterateRhythm to work, but there is something wrong for sure.
All other Rhythm ParameterObjects work just fine.

@ales-tsurko
Copy link
Owner

Please, describe how you used them.

@tjingboem
Copy link
Contributor Author

tjingboem commented Mar 25, 2021

i tried again- still no luck.

In AthenaCL i do:

pi{q}ti{} :: tpmap
select a library: Generator, Rhythm, or Filter. (g, r, f): r
number of events: 120
enter a Rhythm Generator ParameterObject argument: irg, (l,((4,3,1),(4,3,1),(4,2,0),(8,1,1),(4,2,1),(4,2,1)),oc),(bg,rc,(-3,1,-1,5))
apologies: the previous command could not be completed as expected.
please report this bug when quitting, or examine the log (AUlog).

i tried it again but with a much simpler:

pi{q}ti{} :: tpmap
select a library: Generator, Rhythm, or Filter. (g, r, f): r
number of events: 120
enter a Rhythm Generator ParameterObject argument: irg, (l,((4,3,1),(4,2,1)),oc),(c,1)
apologies: the previous command could not be completed as expected.
please report this bug when quitting, or examine the log (AUlog).

This is copied from the manual, i do think there is an error in the AthenaCL code here...

athena-log says:
ERROR, posix.linux-3.8.5.final-2.0.0-a15.2010.07.07-package, Thu Mar 25 12:09:47 2021
TPmap
/usr/local/lib/python3.8/dist-packages/athenaCL/libATH/athenaObj.py, 1090, _cmd
ok, result = cmdObj.do() # returns a dict if a subCmd, otherwise str
/usr/local/lib/python3.8/dist-packages/athenaCL/libATH/command.py, 162, do
if okGfx: self.displayGfx(fmt, dir) # may be an empty method
/usr/local/lib/python3.8/dist-packages/athenaCL/libATH/command.py, 3068, displayGfx
obj = graphPmtr.TPmapCanvas(self.ao, self.objBundle,
/usr/local/lib/python3.8/dist-packages/athenaCL/libATH/libGfx/graphPmtr.py, 277, init
self.splitSco.load()
/usr/local/lib/python3.8/dist-packages/athenaCL/libATH/eventList.py, 788, load
self._loadRawParameter()
/usr/local/lib/python3.8/dist-packages/athenaCL/libATH/eventList.py, 773, _loadRawParameter
dur, sus, acc = pObj(t, refDict)
/usr/local/lib/python3.8/dist-packages/athenaCL/libATH/libPmtr/rhythmSingle.py, 843, call
if self.currentPulse != None: # use bpm if possible
/usr/local/lib/python3.8/dist-packages/athenaCL/libATH/rhythm.py, 393, eq
if self.triple == other.triple and self.format == self.format:
<class 'AttributeError'>
'NoneType' object has no attribute 'triple'

So it is missing an attribute 'triple'...the only word i find back in the manual using 'triple' is the pulseTriple, so that is not it...i also tried to add an extra 3rd ParameterObject because this word triple...nope...

Does this 'triple' make sense to you?
Could you have a try when you find the time?

@ales-tsurko
Copy link
Owner

I can't reproduce it:

pi{b}ti{} :: tpmap
select a library: Generator, Rhythm, or Filter. (g, r, f): r
number of events: 120
enter a Rhythm Generator ParameterObject argument: irg, (l,((4,3,1),(4,3,1),(4,2,0),(8,1,1),(4,2,1),(4,2,1)),oc),(bg,rc,(-3,1,-1,5))
iterateRhythmGroup, (loop, ((4,3,+),(4,3,+),(4,2,o),(8,1,+),(4,2,+),(4,2,+)), orderedCyclic), (basketGen, randomChoice, (-3,1,-1,5))
TPmap display complete.

pi{b}ti{} ::

@tjingboem
Copy link
Contributor Author

strange.....

pi{auto}ti{s} :: pin
name this PathInstance: b
enter a pitch set, sieve, spectrum, or set-class: e
SC 1-1 as (E4)? (y, n, or cancel): y
add another set? (y, n, or cancel): n
PI b added to PathInstances.

pi{b}ti{s} :: tpmap
select a library: Generator, Rhythm, or Filter. (g, r, f): r
number of events: 120
enter a Rhythm Generator ParameterObject argument: irg, (l,((4,3,1),(4,3,1),(4,2,0),(8,1,1),(4,2,1),(4,2,1)),oc),(bg,rc,(-3,1,-1,5))
apologies: the previous command could not be completed as expected.
please report this bug when quitting, or examine the log (AUlog).

I'm using Linux Mint, i believe you are on a Mac?
That is the only difference i can see....

Thanks for trying tho!

@tjingboem
Copy link
Contributor Author

just for me, to keep track:

pi{auto}ti{a} :: tie
edit TI a
which parameter? (i,t,b,r,p,f,o,a,n,x,s,d): a
current amplitude: randomBeta, 0.4, 0.4, (constant, 0.7), (constant, 0.9)
new value: iterateRhythmGroup, (loop, ((4,3,+),(4,3,+),(4,2,o),(8,1,+),(4,2,+),(4,2,+)), orderedCyclic), (basketGen, randomChoice, (-3,1,-1,5))
TIe ERROR: incorrect arguments: parameter lib error (genPmtrObjs: iterateRhythmGroup, None, ('iterateRhythmGroup', ['loop', [[4, 3, '+'], [4, 3, '+'], [4, 2, 'o'], [8, 1, '+'], [4, 2, '+'], [4, 2,
'+']], 'orderedCyclic'], ['basketGen', 'randomChoice', [-3, 1, -1, 5]]))

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