Page 2 of 2
Re: AudioWaveform
Posted: Tue Oct 20, 2026 2:19 am
by bwmilby
I would take a look at the Treeview widget source:
https://github.com/livecode/livecode/tr ... s/treeview
That will show examples of passing arrays to/from a widget. You don’t usually call handlers directly in the widget from LCS. You may be able to use
do in widget though.
Re: AudioWaveform
Posted: Thu Oct 22, 2026 4:38 pm
by pklum
Hi,
Thank you for the directions!
Learned a whole lot about widgets that differs much from Libraries and also about inline documentation from TreeView.
Now I am on a good track!
Google Gemini fooled me a lot about "dispatch" and "send" usage in widgets!
Regards,
Peter
Re: AudioWaveform
Posted: Fri Oct 30, 2026 12:50 am
by pklum
Hello,
I (Appic) have today released the FREE widget "MixPlay". MixPlay is a 64-track audio player for MP3, WAV, or FLAC files.
Use MixPlay to play, up to 64 stems in sample perfect syncronization.
MixPlay supports adjusting "Mute," "Volume," and "Pan" for individual tracks, as well as modifying the pitch and playback rate of the mixed master channel in real time during playback. MixPlay also provides amplitude peaks during playback, allowing for the visualization of VU meters.
The widget has been tested in Livecode Create 1.0 (DP12) Classic Mode in macOS Golden Gate and Windows 11.
Please refer to the included demo stack, "MixPlay_demo.livecode" (shown in the image above) and the dictionary documentation.
If you find bugs or have suggestion for features, please contact mailto:
contact@Appic.se
Download the Widget at
https://appic.se/livecode/mixplay_widget_1.0.1.zip. Please read the ReadMe.txt file in the zip-file.
Visit
https://appic.se/livecode/livecode.html for other Livecode Widgets.
THANKS FOR YOUR SUPPORT!
Best Regards,
Peter (Appic)
Re: AudioWaveform
Posted: Sat Oct 31, 2026 1:04 am
by pklum
Hi,
Updated the MixPlay Widget to 1.0.1 with some bug fixes and changes
Version 1.0.0 released 2026-10-29
Version 1.0.1 released 2026-10-31
- BUGFIX: Now handles filenames with international characters (åäö, etc).
Download the widget at
https://appic.se/livecode/mixplay_widget_1.0.1.zip
Regards,
Peter
Re: AudioWaveform
Posted: Sat Oct 31, 2026 6:52 pm
by pklum
Hi,
see the Waveform widget update history at
viewtopic.php?p=237546#p237546
Regards,
Peter
Re: AudioWaveform
Posted: Sun Nov 01, 2026 4:44 pm
by PaulDaMacMan
pklum wrote: Mon Oct 19, 2026 2:36 pm
I have no idea about licensing issues. In `waveform_core.dylib` and `.dll`, only `dr_libs` (dr_flac, dr_wav, dr_mp3) are used. According to the `dr_libs` documentation it is public domain or MIT-0.
I am not imposing any other license requirements on the Waveform widget.
Excellent! Then this indeed is a really nice gift to the community.
Thanks again for sharing your work. It's very nicely done.
pklum wrote: Mon Oct 19, 2026 5:57 pm
My Questions:
In the Waveform widget all setting and getting are handled via properties, which after some Google Gemini support got sorted out.
In MixPlay I have tried to execute public handlers using (Google Gemini suggestion) with no success using dispatch (it becomes unhandled).
- Could you show me some best practice examples on how to call LCB Widget functions and commands from LCS?
- How should I communicate arrays from LCS to LCB?
- Do you recommend any internet link?
Widgets aren't meant to have functions and commands, they're strictly meant for UI controls, so only uses property setters commands and property getters functions to exchange info with the scripting side. If it's all commands and functions and no on card UI needed then that typically would go in an Extension
Library, not Extension Widget.
However, You could, as I've done for a similar need, implement your own custom parser to enable 'do <sometext> in widget' in you Builder code.
To do that your widget needs to contain a handler OnDo( in pSomeTextToParse as String )
and then have code that processes a string of commands contained in the passed in string.
I use that to enable syntax like:
'do "keyDown" & pChar in widget "My OnScreen Keyboard"
See source here:
https://github.com/OpenXTalk-org/OpenXT ... enKeyboard
Re: AudioWaveform
Posted: Mon Nov 02, 2026 12:10 am
by pklum
Hi PaulDaMacMan,
Thank you for the info and Thanks!
My first implementing of MixPlay was a Library and got it to work fine. But the "problem" is that the Library needed a persistant pointer to the audio engine and I wanted to have the ability to have many (not that many) MixPlay players in a stack. My solution was to convert the Library to a widget where each widget holds its own pointer to each own audio engine. Maybe that could be solved with a Library as well. But I am a newbie at LCB so that was my solution. Developing a Widget was more painful then implementing a Library.
I have updated the Waveform Widget with performance updates.
Best Regards,
Peter
Re: AudioWaveform
Posted: Thu Nov 05, 2026 4:21 pm
by PaulDaMacMan
pklum wrote: Mon Nov 02, 2026 12:10 am
Maybe that could be solved with a Library as well. But I am a newbie at LCB so that was my solution. Developing a Widget was more painful then implementing a Library.
I have updated the Waveform Widget with performance updates.
Best Regards,
Peter
Yeah Widgets have their own particular set of 'gotchas' and some undocumented (that I'm aware of) or poorly documented features.
You can retain multiple instance pointer types variables in a list/array, that is containing multiple 'as pointer' type values as elements, and then come up with additional properties for each to track which pointer is which (like ["instancePointer"= pTargetInstancePointer], ["channel"=pChannelNumber] ). Whether or not to keep instance pointers in separate widget instances, or keep them in a list/array is really up to your goals for it, I suppose.
You could also make two versions, a Lib and a Widget. That's what I wound up doing for an Apple "Native" PDF Widget I'd worked on. It built a Widget version (which should work on iOS too), but first I'd made it as a library version which used FFI to create its own, library-owned NSWindow (Mac only) for displaying the PDF.
Thanks again for sharing.
Re: AudioWaveform
Posted: Tue Dec 01, 2026 6:04 pm
by pklum
Hi,
Appic has just release the
FREE Spectrum Widget.
viewtopic.php?t=40845
Regards,
Peter (Appic)