Volume Adjustng on a Nexia
bdavis04
Posts: 2
Hello Everyone:
I have a newbie question that hopefully someone can point me in the right direction. I have a NI-700 controlling a Nexia CS. I am writing a new module from scratch, mostly just getting the feel for how all of this works. Right now I can mute, unmute, mute with pink noise, and unmute it. What I seem to be struggling with is volume adjustment. It could be that I am thinking about it wrong, but I could use a little push in the right direction.
To adjust the volume, I want to get the current value of the full scale output for the channel/device for each output channel. If you're pressing volume up, then bump it to the next level. If you're pressing down, bump it down.
The problem I'm having is getting the current full scale value for each channel. I've seen some people using create_buffer within the data event but I'm not sure if I need to get that complicated or maybe there's an easier way.
The other thing I thought about is if I create a data event for the entire Nexia device like what I have seen in others' examples, couldn't you possibly inadvertently increase/decrease the volume level when some other data event happens for that device? The way I understand it, any time you send/recieve commands to the device, you're going to create a data event.
Thanks,
Brian
I have a newbie question that hopefully someone can point me in the right direction. I have a NI-700 controlling a Nexia CS. I am writing a new module from scratch, mostly just getting the feel for how all of this works. Right now I can mute, unmute, mute with pink noise, and unmute it. What I seem to be struggling with is volume adjustment. It could be that I am thinking about it wrong, but I could use a little push in the right direction.
To adjust the volume, I want to get the current value of the full scale output for the channel/device for each output channel. If you're pressing volume up, then bump it to the next level. If you're pressing down, bump it down.
The problem I'm having is getting the current full scale value for each channel. I've seen some people using create_buffer within the data event but I'm not sure if I need to get that complicated or maybe there's an easier way.
The other thing I thought about is if I create a data event for the entire Nexia device like what I have seen in others' examples, couldn't you possibly inadvertently increase/decrease the volume level when some other data event happens for that device? The way I understand it, any time you send/recieve commands to the device, you're going to create a data event.
Thanks,
Brian
0
Comments
Well, in this instance, the Nexia also support INCREMENT and DECREMENT. This will solve your problem, but not all audio processors allow this...
You would create a DATA_EVENT for a specific device, like so:
Now every string to gets sent from the Nexia will get "trapped" in your DATA_EVENT.
The DATA_EVENT itself is ONLY used for strings to are received from the device...
Hope this helps
Yeah, that did the trick.... Thanks.
The only thing I have left to do is figure out which button (volume up, volume down) was pressed. I was thinking of setting a flag in the push button event so I'll know which was which.
Thanks!
Brain
GET_LAST()
to elaborate:
or
where dcVolumeControl is: