SpriteAudio ? Export marker,Label in JSON

Anything you think is missing, or needs enhancement, goes here.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
jonForum
Posts: 4
Joined: Fri Apr 19, 2019 7:25 pm
Operating System: Windows 10

SpriteAudio ? Export marker,Label in JSON

Post by jonForum » Fri Apr 19, 2019 7:39 pm

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 :)

jonForum
Posts: 4
Joined: Fri Apr 19, 2019 7:25 pm
Operating System: Windows 10

Re: SpriteAudio ? Export marker,Label in JSON

Post by jonForum » Tue Apr 23, 2019 6:14 pm

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
:D

steve
Site Admin
Posts: 80693
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: SpriteAudio ? Export marker,Label in JSON

Post by steve » Tue Apr 23, 2019 6:52 pm

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
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

jonForum
Posts: 4
Joined: Fri Apr 19, 2019 7:25 pm
Operating System: Windows 10

Re: SpriteAudio ? Export marker,Label in JSON

Post by jonForum » Tue Apr 23, 2019 7:42 pm

steve wrote:
Tue Apr 23, 2019 6:52 pm
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
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"
  }
}

jonForum
Posts: 4
Joined: Fri Apr 19, 2019 7:25 pm
Operating System: Windows 10

Re: SpriteAudio ? Export marker,Label in JSON

Post by jonForum » Tue Apr 23, 2019 10:18 pm

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 ?
Image

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?
Image

i also try with export2 but ...
Image

Maybe i need a good example to perform :)
thank and any help are welcome.

steve
Site Admin
Posts: 80693
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: SpriteAudio ? Export marker,Label in JSON

Post by steve » Tue Apr 23, 2019 10:54 pm

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
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply