Building adsr with line~ , issues when attacktime is 1ms
@gentleclockdivider said:
@porres
I post on multiple forums because that way I get answers more quickly
You're just confirming what I said, that you think your time is more valuable than other's, which is also being quite selfish. I know it's convenient to you, of course, but if you cared about not being inconvenient to others, you wouldn't do that.
Also, please try to read the documentation. You ask many questions that could be prevented from carefully reading a help file. Again, I know it's more convenient to you to not waste time studying and just throw questions everywhere and wait for the generousity of other human beings (cause you know, we're not ChatGPT) to teach you basic things for free.
You seem to be investing a lot in Pd, you're working a lot with it and you show you really want to know it, to the point you're ignoring about externals cause "you wanna lear how to do it yourself". If you wanna really dive in and learn it so badly, just RTFM, right?
I know that this one question was something hard to get from the help file itself, and I was actually grateful for your question cause it made me improve it. But also, been already annoyed many other times and if you read the audio examples you'd find out about the [line~] vs [vline~] deal, and I guess that'd be good for you and I guess you may learn a lot more if you spend some effort.
Don't hesitate to make more questions but please just make it sure and clear to us that you're at least trying to do your homework beforehand.
cheers
[vline~] may not start at block boundaries
@whale-av I think I answered some of your questions in my previous reply to @lacuna, so let me ask you to clarify what you meant by tabwrite~ vs print~. I think the following test shows they're exactly the same:
tabwrite~ vs print~.pd
Even if I run it via a delay with a fractional block time it's the same.
New externals for Windows
I appreciate your interest in my library, and I'm happy to answer your questions. However, I have to admit that I'm a bit surprised by the number of questions I'm getting, especially on a Sunday afternoon. I've been working with Max and Pd since the early 2000s, and I've had the privilege of knowing many of the people involved in these projects, including Miller Puckette, as well as collaborators at Ircam and the University of California, where I studied and taught. I've always been impressed by the sense of community and camaraderie that has defined this group, and it's a bit disheartening to see a change in behavior that seems more focused on scrutiny and skepticism. To be honest, I'm getting more questions than I did during my dissertation exam with Miller Puckette, which is a bit overwhelming. I understand that English may not be the first language for many of you, and I'm doing my best to respond to every single comment. To answer your questions once again, I've already mentioned that all sources will be available if that's your concern. If you're interested in exploring the library now, you can download the Windows installer from the repo or wait until I upload the deken package, which is ready and just waiting for my account to be set up. I hope this clears up any remaining questions, and I wish you all a good rest of the evening. But I have to say, the tone and behavior I'm seeing here is making me reflect on whether I should really be sharing my work with this community. I've always been driven by a desire to contribute and share my knowledge, but it's hard to feel motivated to do so when I'm met with this level of skepticism and scrutiny.
Tabplay~ -tabread~
I have build a six shot sampler with tabplay~ objects since these have the benefit of sample accurate adjusting the start adress ( helpfull when recording too late )
But since these are one shot ( adjustable end adress too ) and non transposable , I wonder if there's a method to adjsut the start adress of tabread~ objects .
Assume the tabread is 88200 samples long , but recording only begun after 17500 samples .
I can use the same method as tabread , use as fader 0-1 multiplied by lenght of file into line ~ and into tabread to get to the first audible sample peaks to determine start adress
So I get a tabread of 176400 samples , with 90000 samples of silence at the beginning , subtracting these from the sample length is 86400
SO the Line should start at 86400 instantly , then the second phase are the resulting samples and time correction .of 1959 MS
OK got it
This should be it
90000 0 0 ,17640 1959 0 ,0 0 1959
summer: an additive synthesizer with per-partial ADSR amplitude envelopes & LFOs
I took a shot at optimizing a bit. the main patch looks good but in addosc there are a few little things (which may add up bc you have 224 of them):
[tabread~]
is taking a control-rate input. So, it isn't doing anything that [tabread]
couldn't do, and have it translated to a signal later down the graph instead. The difference is that [tabread~]
will still process the last input every sample whereas [tabread]
will only output when it gets a new message. (so you'll be doing about samplerate times fewer computations if you have a new input every second)
similarly [+~ ]
and [*~ ]
are more efficient if you use the versions with a control-rate right inlet bc the loops can be vectorized and maybe predicted better. (to do this supply them with a float argument).
generally the arithmetic objects are more efficient than the [expr~]
family. And, [expr~ 1 - $v1]
is also another case of not needing the signal version bc the input is control-rate (after changing it to [tabread]
). Instead you can change it to [1 $1(
going into a [- ]
. (tho in this case idk if it is actually better than [expr 1 - $f1]
bc we also have to process/send the list from the message box.. the main thing is making it control-rate tho)
The final little thing is replacing the division [/ 127]
in the adsr subpatch by multiplication with the reciprocal, bc processors are better at multiplying than dividing. You can do this any time you're dividing by a value that won't change.
hope it helps
addosc.pd
as for locality I think the only way is to use $0 in your arrays like you say.. you might consider making addvoice an abstraction as well. Then you could supply $0 as the argument, and inside supply it as the 2nd argument of [addosc]
with $1, which could then use it as $2 in the [tabread]
s to refer to the grandparent's $0
that way you'd only have to edit 28 [addosc]
s instead of 224
tabread midi notes.
Hi Everyone
Maybe I am doing something wrong, but I would like to creat a number fo tabread objects to play midu notes.
However I can't seem to name my tabread object anything other than 'tabread notes' in order to play the notes.Snapshot.pd
I already have a few tabread notes objects so I am trying to create unique tabread objects so I can control which notes are read etc.
Is it possible to name tabread anything other than 'notes' in order to have it read midi notes?
Jb
Tabwrite~/array has problems working as a long timebase oscilloscope?
Hi all,
I needed to have some more long-running visualisation of waveforms in PD, so as there is no vanilla [scope~]
object, I thought I'd use [tabwrite~]
with [array]
, as commonly recommended - however, I have stumbled upon a somewhat strange behavior, which I'm not sure whether it's a bug. This is on Ubuntu 18.04, vanilla Puredata from Ubuntu repos (0.48.1-3)
So, basically I made a patch, which is mostly reused help of [tabwrite~]
:
The patch itself is here: test-array-scopevis-metro.pd
So, basically, I want to view signals as if on a scope with timebase of 1 second. My PD/Media/Audio Settings tells me: Sample rate: 44100, Block size: 64, Delay (msec): 25
So, all I have in addition to what was there in the [tabwrite~]
help, is a few objects to set the array98
array size to 44100 when the patch is loaded - so there is enough memory to record 1 second of signal. And then I've added a metro, so it bangs the tabwrite~
each second (each 1000 msec) - the idea being that I bang the tabwrite~
, it records 44100 samples in a second and shows them, then after that second I bang again, it records 44100 samples in a second and shows them anew and so on - pretty much like an oscilloscope at a timebase of 1 sec would do.
However, the actual response is shown in this video:
That is, when I start the metro at 1000 msec, it keeps banging for at least 10 times, without the array ever refreshing the waveform display?! Then, when I stop the metro, the waveform is displayed ?! At that point, I draw whatever in the array graph so as to "reset" this display, change the metro to 1001 msec - and start the metro again. This time the display does update as expected - but only after an initial delay of some 2 seconds (or three bangs) - I would have otherwise expected a delay of 1 second (two bangs).
Does anyone knows why this happens, and how to get a more reliable behavior for this kind of case? My guess is, for a [metro 1000]
, PD actually does not have enough time to fill the entire array with all 44100 samples, and thus it never updates the graph - apparently 1 millisecond extra is enough for PD to realize that the array has been filled, and so it updates the graph, but then why does it take 2 sec (at 3rd bang) to update, and not only 1 second (at 2nd bang)?
Midi to hz, and hz to midi formulas
I've recently taken "the tour" to Mathematics Stack Exchange. Initially, I thought it was going to be some sort of light-hearted pics plus some words about the site. Fortunately, it was much better than that.
"The tour" is an interesting way of inviting you to read the rules. I think these rules also act as a reminder, a reminder of the important stuff.
You can, of course, take the "tour" by yourself, but these are some of the things you can read there.
- Ask questions, get answers, no distractions.
- This site is all about getting answers. It's not a discussion forum. There's no chit-chat.
- Get answers to practical, detailed questions.
- Focus on questions about an actual problem you have faced.
- Not all questions work well in our format. Avoid questions that are primarily opinion-based, or that are likely to generate discussion rather than answers. Questions that need improvement may be closed until someone fixes them.
http://math.stackexchange.com/tour
As @dangrondang (F.) said, hope this helps.
Cordially, Landon
Compiled external saying "couldn't create" when being added to PD
Greetings All
I'm having trouble getting my external to work, It compiles with 5 warnings
sineq.c:48: warning: unused variable ‘x’
sineq.c:49: warning: unused variable ‘in1’
sineq.c:50: warning: unused variable ‘in2’
sineq.c:51: warning: unused variable ‘in3’
sineq.c:52: warning: unused variable ‘in4’
It does a "make" successfully but I get this warning message
/usr/bin/ld: warning: cannot find entry symbol xport_dynamic; defaulting to 00000000000007f0
but when I try and add it in PD it says "couldn't create". I've looked at the pan~ tutorial and the d_osc.c file as recommended, which did help. I tried to take pieces from the two which I thought were applicable to my situation but I'm still having some issues.
Here's a link to the workflow (dropbox)
http://dl.dropbox.com/u/6576402/questions/pd/Sine_EQ_Diagram.jpg
Here's a link to the C code online (pastebin)
http://pastebin.com/9rK3szUE
My external is a reproduction of the sinewave equation with 4 inputs and one output my logic is to have 4 inlets one for the frequency,amplitude,phase and vertical offset and an output for the created signal. Granted this isn't the final equation but this will help me understand how to create the full equation once done. If you want to see the full equation I'll be using here's a link to it below. Basically it's a 1 second periodic signal with the sample rate at 44100 which the equation gives me control over the frequency,amplitude,phase and vertical offset.
Another question I have is what do I use for the t (time) for my final equation is that the t_sample object in PD? or do I need to create a for loop counting from 1-44100 for a 1 second 44100 sampled equation?
http://dl.dropbox.com/u/6576402/questions/eq1.txt
PS: I'm compiling on ubuntu 10.04 using gcc
Array question
yep
that's what I did. boooo to me.
I'm sorry.
Could you explain why the tabwrite bit always says [tabwrite~ 2-array] even when it's writing to other arrays (1-array, 3-array). why isn't it just like [tabwrite~ $1-array].
again I'm sorry if this is a silly question. I'd just like to understand it better.
Thanks again Domien
Iain