hi list,
i was wondering if i can somehow force a redraw of an array while it is recorded into via [tabwrite~] ?
as it is now, the array only displays the new data once tabwrite~ has finished writing.
i would like to use the array as a UI element in an art installation and ideally it should look like in a DAW that records, so the waveforms should appear every 300ms or so while recording. sound output will be muted during the 5 second recording, in case the redraw could interfer with sound output. sound input should be consistent though since i record into the buffer :-)
cheers
I would record into a table and then have a second visual array that gets updated from the table every 300ms
On Mon, 27 Mar 2023 at 23:38, Simon Iten itensimon@gmail.com wrote:
hi list,
i was wondering if i can somehow force a redraw of an array while it is recorded into via [tabwrite~] ?
as it is now, the array only displays the new data once tabwrite~ has finished writing.
i would like to use the array as a UI element in an art installation and ideally it should look like in a DAW that records, so the waveforms should appear every 300ms or so while recording. sound output will be muted during the 5 second recording, in case the redraw could interfer with sound output. sound input should be consistent though since i record into the buffer :-)
cheers
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
You can force the redrawing of the array by writing to it with control objects like [tabwrite] or [array set]; e.g you can repeatedly write 0 to index 0: [metro 50] | [0( | [array set THE_ARRAY]
Le lun. 27 mars 2023 à 17:45, Matt Davey hard.off@gmail.com a écrit :
I would record into a table and then have a second visual array that gets updated from the table every 300ms
On Mon, 27 Mar 2023 at 23:38, Simon Iten itensimon@gmail.com wrote:
hi list,
i was wondering if i can somehow force a redraw of an array while it is recorded into via [tabwrite~] ?
as it is now, the array only displays the new data once tabwrite~ has finished writing.
i would like to use the array as a UI element in an art installation and ideally it should look like in a DAW that records, so the waveforms should appear every 300ms or so while recording. sound output will be muted during the 5 second recording, in case the redraw could interfer with sound output. sound input should be consistent though since i record into the buffer :-)
cheers
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Perfect, thanks!! (and pretty obvious now that I think about it)
On 27 Mar 2023, at 18:40, Antoine Rousseau antoine@metalu.net wrote:
You can force the redrawing of the array by writing to it with control objects like [tabwrite] or [array set]; e.g you can repeatedly write 0 to index 0: [metro 50] | [0( | [array set THE_ARRAY]
Le lun. 27 mars 2023 à 17:45, Matt Davey <hard.off@gmail.com mailto:hard.off@gmail.com> a écrit :
I would record into a table and then have a second visual array that gets updated from the table every 300ms
On Mon, 27 Mar 2023 at 23:38, Simon Iten <itensimon@gmail.com mailto:itensimon@gmail.com> wrote:
hi list,
i was wondering if i can somehow force a redraw of an array while it is recorded into via [tabwrite~] ?
as it is now, the array only displays the new data once tabwrite~ has finished writing.
i would like to use the array as a UI element in an art installation and ideally it should look like in a DAW that records, so the waveforms should appear every 300ms or so while recording. sound output will be muted during the 5 second recording, in case the redraw could interfer with sound output. sound input should be consistent though since i record into the buffer :-)
cheers
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
I'd propose a 'redraw' method to arrays
Em seg., 27 de mar. de 2023 às 15:06, Simon Iten itensimon@gmail.com escreveu:
Perfect, thanks!! (and pretty obvious now that I think about it)
On 27 Mar 2023, at 18:40, Antoine Rousseau antoine@metalu.net wrote:
You can force the redrawing of the array by writing to it with control objects like [tabwrite] or [array set]; e.g you can repeatedly write 0 to index 0: [metro 50] | [0( | [array set THE_ARRAY]
Le lun. 27 mars 2023 à 17:45, Matt Davey hard.off@gmail.com a écrit :
I would record into a table and then have a second visual array that gets updated from the table every 300ms
On Mon, 27 Mar 2023 at 23:38, Simon Iten itensimon@gmail.com wrote:
hi list,
i was wondering if i can somehow force a redraw of an array while it is recorded into via [tabwrite~] ?
as it is now, the array only displays the new data once tabwrite~ has finished writing.
i would like to use the array as a UI element in an art installation and ideally it should look like in a DAW that records, so the waveforms should appear every 300ms or so while recording. sound output will be muted during the 5 second recording, in case the redraw could interfer with sound output. sound input should be consistent though since i record into the buffer :-)
cheers
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
actually it'd make more sense to add this method to [tabwrite~]
in cyclone and else the objects that record into arrays get refreshed a a hardcoded rate of 500ms (not too far from 300ms)
Em seg., 27 de mar. de 2023 às 16:18, Alexandre Torres Porres < porres@gmail.com> escreveu:
I'd propose a 'redraw' method to arrays
Em seg., 27 de mar. de 2023 às 15:06, Simon Iten itensimon@gmail.com escreveu:
Perfect, thanks!! (and pretty obvious now that I think about it)
On 27 Mar 2023, at 18:40, Antoine Rousseau antoine@metalu.net wrote:
You can force the redrawing of the array by writing to it with control objects like [tabwrite] or [array set]; e.g you can repeatedly write 0 to index 0: [metro 50] | [0( | [array set THE_ARRAY]
Le lun. 27 mars 2023 à 17:45, Matt Davey hard.off@gmail.com a écrit :
I would record into a table and then have a second visual array that gets updated from the table every 300ms
On Mon, 27 Mar 2023 at 23:38, Simon Iten itensimon@gmail.com wrote:
hi list,
i was wondering if i can somehow force a redraw of an array while it is recorded into via [tabwrite~] ?
as it is now, the array only displays the new data once tabwrite~ has finished writing.
i would like to use the array as a UI element in an art installation and ideally it should look like in a DAW that records, so the waveforms should appear every 300ms or so while recording. sound output will be muted during the 5 second recording, in case the redraw could interfer with sound output. sound input should be consistent though since i record into the buffer :-)
cheers
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
yeah, the workaround with array_set causes clicks in the recording here… so not the best way.
On 27 Mar 2023, at 21:21, Alexandre Torres Porres porres@gmail.com wrote:
actually it'd make more sense to add this method to [tabwrite~]
in cyclone and else the objects that record into arrays get refreshed a a hardcoded rate of 500ms (not too far from 300ms)
Em seg., 27 de mar. de 2023 às 16:18, Alexandre Torres Porres <porres@gmail.com mailto:porres@gmail.com> escreveu: I'd propose a 'redraw' method to arrays
Em seg., 27 de mar. de 2023 às 15:06, Simon Iten <itensimon@gmail.com mailto:itensimon@gmail.com> escreveu: Perfect, thanks!! (and pretty obvious now that I think about it)
On 27 Mar 2023, at 18:40, Antoine Rousseau <antoine@metalu.net mailto:antoine@metalu.net> wrote:
You can force the redrawing of the array by writing to it with control objects like [tabwrite] or [array set]; e.g you can repeatedly write 0 to index 0: [metro 50] | [0( | [array set THE_ARRAY]
Le lun. 27 mars 2023 à 17:45, Matt Davey <hard.off@gmail.com mailto:hard.off@gmail.com> a écrit : I would record into a table and then have a second visual array that gets updated from the table every 300ms
On Mon, 27 Mar 2023 at 23:38, Simon Iten <itensimon@gmail.com mailto:itensimon@gmail.com> wrote: hi list,
i was wondering if i can somehow force a redraw of an array while it is recorded into via [tabwrite~] ?
as it is now, the array only displays the new data once tabwrite~ has finished writing.
i would like to use the array as a UI element in an art installation and ideally it should look like in a DAW that records, so the waveforms should appear every 300ms or so while recording. sound output will be muted during the 5 second recording, in case the redraw could interfer with sound output. sound input should be consistent though since i record into the buffer :-)
cheers
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list https://lists.puredata.info/listinfo/pd-list _______________________________________________ Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list https://lists.puredata.info/listinfo/pd-list
You could use the shmem library in another pd instance to show the array without interfering with the audio ?
Le mar. 28 mars 2023 à 09:32, Simon Iten itensimon@gmail.com a écrit :
yeah, the workaround with array_set causes clicks in the recording here… so not the best way.
On 27 Mar 2023, at 21:21, Alexandre Torres Porres porres@gmail.com wrote:
actually it'd make more sense to add this method to [tabwrite~]
in cyclone and else the objects that record into arrays get refreshed a a hardcoded rate of 500ms (not too far from 300ms)
Em seg., 27 de mar. de 2023 às 16:18, Alexandre Torres Porres < porres@gmail.com> escreveu:
I'd propose a 'redraw' method to arrays
Em seg., 27 de mar. de 2023 às 15:06, Simon Iten itensimon@gmail.com escreveu:
Perfect, thanks!! (and pretty obvious now that I think about it)
On 27 Mar 2023, at 18:40, Antoine Rousseau antoine@metalu.net wrote:
You can force the redrawing of the array by writing to it with control objects like [tabwrite] or [array set]; e.g you can repeatedly write 0 to index 0: [metro 50] | [0( | [array set THE_ARRAY]
Le lun. 27 mars 2023 à 17:45, Matt Davey hard.off@gmail.com a écrit :
I would record into a table and then have a second visual array that gets updated from the table every 300ms
On Mon, 27 Mar 2023 at 23:38, Simon Iten itensimon@gmail.com wrote:
hi list,
i was wondering if i can somehow force a redraw of an array while it is recorded into via [tabwrite~] ?
as it is now, the array only displays the new data once tabwrite~ has finished writing.
i would like to use the array as a UI element in an art installation and ideally it should look like in a DAW that records, so the waveforms should appear every 300ms or so while recording. sound output will be muted during the 5 second recording, in case the redraw could interfer with sound output. sound input should be consistent though since i record into the buffer :-)
cheers
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Tue, 2023-03-28 at 09:29 +0200, Simon Iten wrote:
yeah, the workaround with array_set causes clicks in the recording
The visual representation of arrays whose number of samples exceeds the number of visual pixels suffers from aliasing so that resulting visual waveform looks pretty random sometimes. Another issue is that the amount of data is pretty large in the table holding audio data, much larger than what is necessary for a proper visual representation. This lead me to create an abstraction [rh_wavedisplay] that translates original audio data from a table to a smaller table that is only used for visual representation. Because the display table is much smaller, updating it is not so costly and it allows for neat tricks like zooming and panning. Also, you can use it to update the display during the recording to an audio table. See example in the link:
https://netpd.org/~roman/tmp/wavedisplay_example.zip
The visual table has twice the points of its visual width in pixels so that the minimum and maximum of the segment of audio data covered by one display pixel is displayed. This creates a solid black waveforms for audio data that would otherwise be displayed with weird aliasing.
Note: there is a bug where some peaks of the previous display are still apparent in the updated display. If some brave person knows how to fix this, that would be more than welcome.
Roman