Page 1 of 1
SpriteAudio ? Export marker,Label in JSON
Posted: Fri Apr 19, 2019 7:39 pm
by jonForum
Hi guys existe ways to export
labels or
regions in json ?
I really need this for work with a API that allow
spriteAudio
example here
http://pixijs.io/pixi-sound/examples/sprites.html
So i need a way to make regions label, than export in json with current setup.
Code: Select all
fileName:{
'regionName: { start: 1, end: 2 },
'regionName': { start: 3, end: 3.5 },
'regionName': { start: 4, end: 7.2 },
'regionName: { start: 8, end: 8.5 },
// ....
}
thanks a lot for help or if you find this suggest useful

Re: SpriteAudio ? Export marker,Label in JSON
Posted: Tue Apr 23, 2019 6:14 pm
by jonForum
i create little tutorial here but we really need a wait to export in json fro audacity
https://github.com/pixijs/pixi-sound/wi ... h-Audacity

Re: SpriteAudio ? Export marker,Label in JSON
Posted: Tue Apr 23, 2019 6:52 pm
by steve
jonForum wrote: ↑Tue Apr 23, 2019 6:14 pm
but we really need a wait to export in json fro audacity
In Audacity 2.3.1
"Extra menu > Scriptables II > Get Info" and select the "Labels" option.
https://manual.audacityteam.org/man/ext ... l#get_info
Re: SpriteAudio ? Export marker,Label in JSON
Posted: Tue Apr 23, 2019 7:42 pm
by jonForum
Hum thank , this look cool, let see if i can made a macro to export labels in time time format for audio web API.
i need able to export something like this.
Code: Select all
"
"fileName":{
"boing_1": {
"start": "0.225725",
"end": "0.767466"
},
"boing_2": {
"start": "2.257252",
"end": "2.988601"
},
"boing_3": {
"start": "4.577707",
"end": "5.354201"
},
"boing_4": {
"start": "6.871075",
"end": "7.620482"
},
"boing_5": {
"start": "11.322375",
"end": "11.864116"
}
}
Re: SpriteAudio ? Export marker,Label in JSON
Posted: Tue Apr 23, 2019 10:18 pm
by jonForum
Hum i think i will need some pro-user to help me perform this.
If anybody can give me more help to make a macro to export labels in a formated json ?
I think it will need able to add custom Regex ? or other tricks with macro to edit current json ?
I know Audacity macro are experimental, but if a pro-user can help me with this
This macro setup for now, give me a message log like this, but it not saved! and cant add regex for custom format?
i also try with export2 but ...
Maybe i need a good example to perform

thank and any help are welcome.
Re: SpriteAudio ? Export marker,Label in JSON
Posted: Tue Apr 23, 2019 10:54 pm
by steve
I mentioned "GetInfo" because of your comment:
"but we really need a wait to export in json fro audacity"
I haven't looked into what you are doing with "SpriteAudio" (not really my field).
The GetInfo command is primarily intended for use with "mod-script-pipe", which is an optional module that enables external scripting languages (such as Python) to communicate with Audacity via named pipes.
To date, md-script-pipe has been a separate download from Audacity, and available only as source code, requiring the user to build Audacity and the module from source. The next release of Audacity (2.3.2) will ship with mod-script-pipe included, so anyone that wants to use it only needs to enable it in Audacity's preferences. If you wish to look at mod-script-pipe, there's a pre-release (alpha) build available on Audacity's FossHub developer page here:
https://www.fosshub.com/Audacity-devel.html
More information can be found in the alpha manual:
https://alphamanual.audacityteam.org/man/Scripting
and
https://alphamanual.audacityteam.org/ma ... _Reference
Probably the easiest way to use mod-script-pipe with Python, is to use the "pipeclient" module, available here:
https://github.com/audacity/audacity/bl ... eclient.py