setting high pass frequency cutoff from slider data

5 views
Skip to first unread message

Leonard Terry

unread,
Mar 30, 2015, 10:36:51 AM3/30/15
to pl...@googlegroups.com

I have tried using keyword .value to set my high pass cutoff frequency from a UISlider value but it comes up with error message "property 'value' not found on object of type 'PAEProcess'"


When i tried using no keyword after hPFilt.frequency then it comes up with error message "Semantic Issue: Assignment to readonly property"


Is there a suitable way to de-bug this issue as i have tried looking through all the PAEProcess, PAEFilterHighPass, PAEFilter headers to find an appropriate keyword but can't avoid some kind of error message or another.




else if (sender == self.highPassSlider)

    {

        // update high pass freq

        PAEFilterHighPass* hPFilt = app.highPassFilters[self.editIndex];

        hPFilt.frequency.??? = self.highPassSlider.value;

        

        // update the info label

        [self setInfo: [NSString stringWithFormat:@"Cutoff: %3.1f Hz", self.highPassSlider.value]];

    }

Martin Robinson

unread,
Apr 1, 2015, 11:41:59 AM4/1/15
to pl...@googlegroups.com, Leonard Terry
If you're setting the value from a slider then you would normally create a PAEControl and assign this to the input of the PAEProcess property

Based on your code you could do:

hPFilt.frequency.input = [PAEConstant constantWithValue:self.highPassSlider.value];


but this wouldn't work well if the slider was changed frequently. 

You probably don't need to store an array of the PAEFilterHighPass objects. Once they're plugged into the signal chain e.g. via a PAEChannelStrip insert, you can usually forget about the process object. You just need to keep copies of the controls over those processors. 

There isn't a .value property for the frequency because it might not be a simple value  it could be another signal like a sine wave LFO or and amplitude follower. 

Martin

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "pl-nk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pl-nk+un...@googlegroups.com.
To post to this group, send email to pl...@googlegroups.com.
Visit this group at http://groups.google.com/group/pl-nk.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages