Using Blender as video player for in-sync audio in Audacity(without using Jack)

Audio software developers forum.
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
tintwotin
Posts: 67
Joined: Tue Sep 09, 2014 7:58 am
Operating System: Please select

Using Blender as video player for in-sync audio in Audacity(without using Jack)

Post by tintwotin » Tue Mar 16, 2021 6:25 pm

By this Blender add-on, Steve helped me out doing, audio can be send back and forth between the two apps:
https://github.com/tin2tin/audacity_tools_for_blender

And as demo'ed in this video, Blender can be used as video player for Audacity(as long as you use the play/stop button in Blender):
https://blender.chat/file-upload/4rjJTp ... -59-15.mp4
Unfortunately, there doesn't seem to be a way to send the playhead position from Audacity to Blender, so the playback could be initiated from Audacity too.

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

Re: Using Blender as video player for in-sync audio in Audacity(without using Jack)

Post by steve » Tue Mar 16, 2021 7:36 pm

Nice to see your work in a public repository.
tintwotin wrote:
Tue Mar 16, 2021 6:25 pm
Unfortunately, there doesn't seem to be a way to send the playhead position from Audacity to Blender,
Although there are no firm plans at present, I'm hoping that may come in the future.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

tintwotin
Posts: 67
Joined: Tue Sep 09, 2014 7:58 am
Operating System: Please select

Re: Using Blender as video player for in-sync audio in Audacity(without using Jack)

Post by tintwotin » Tue Mar 16, 2021 10:19 pm

@steve Is there some gain added when audio is imported and exported in/out of Audacity?

Here's the same strip in Blender, however the top one has been send to Audacity and back:
Image

We already noticed it when importing into Audacity, that some red lines appeared, which wasn't in Blender, so we compensated by adding envelope points to all strips lowering the volume a bit. The image above, is with this implemented, so there must also be some gain on exporting?

Is this a know thing? And if it is, how much do we need to compensate i/o?

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

Re: Using Blender as video player for in-sync audio in Audacity(without using Jack)

Post by steve » Tue Mar 16, 2021 10:29 pm

tintwotin wrote:
Tue Mar 16, 2021 10:19 pm
Is there some gain added when audio is imported and exported in/out of Audacity?
There could be if the track gain slider is not at zero. By default it is at zero.
(https://manual.audacityteam.org/man/aud ... .html#gain)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

tintwotin
Posts: 67
Joined: Tue Sep 09, 2014 7:58 am
Operating System: Please select

Re: Using Blender as video player for in-sync audio in Audacity(without using Jack)

Post by tintwotin » Thu Mar 18, 2021 2:54 pm

It is set to zero. I can't really tell if it's on the Blender(import) or the Audacity(import or export) side the gain is happening.

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

Re: Using Blender as video player for in-sync audio in Audacity(without using Jack)

Post by steve » Thu Mar 18, 2021 3:09 pm

tintwotin wrote:
Thu Mar 18, 2021 2:54 pm
I can't really tell if it's on the Blender(import) or the Audacity(import or export) side the gain is happening.
Try temporarily modifying the script to export somewhere else so that you can test the exported file outside of Blender.

Example, you could analyze the exported file with SoX (http://sox.sourceforge.net/)

Code: Select all

sox <input file> -n stats
where <input file> is the input file name, and "-n" means "output to null".
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

tintwotin
Posts: 67
Joined: Tue Sep 09, 2014 7:58 am
Operating System: Please select

Re: Using Blender as video player for in-sync audio in Audacity(without using Jack)

Post by tintwotin » Thu Mar 18, 2021 3:11 pm

Good idea.

tintwotin
Posts: 67
Joined: Tue Sep 09, 2014 7:58 am
Operating System: Please select

Re: Using Blender as video player for in-sync audio in Audacity(without using Jack)

Post by tintwotin » Mon Mar 22, 2021 8:23 am

Could it be related to mono added as stereo and then exported from Audacity? In this process, is a volume gain to be expected?

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

Re: Using Blender as video player for in-sync audio in Audacity(without using Jack)

Post by steve » Mon Mar 22, 2021 9:43 am

When adding mono audio to a stereo track, the expected behaviour is that the same, unaltered audio will be added to both left and right channels.

When exporting a stereo track as mono, the expected behaviour is that the left and right channels will be mixed (added together) then scaled by a factor of (exactly) 0.5. If the export format has a lower bit format, then there may be "dither" added (shaped noise at around -72 dB peak), depending on your settings (see: https://manual.audacityteam.org/man/dither.html)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply