2020-11-10 19:32:14

Would it be possible to add a gain property to all generators?
If I plug a few generators into a DirectSource, I can't change the volume of an individual generator.

2020-11-10 19:53:02

that's on the list somewhere, yes.

My Blog
Twitter: @ajhicks1992

2020-11-28 06:14:53 (edited by camlorn 2020-11-28 06:15:18)

I've just dropped Synthizer 0.7.6, which adds support for Linux, including being able to pip install and have the Python binding build Synthizer from source.  Should finally be back to features and performance improvements, etc, from here.  I know more than a couple people have asked for this, so would appreciate people trying it and reporting issues.

I'm going to do mac at some point, where at some point is when I get hardware.  Had a bit of extra money come my way so that's not as far off in the future.  Would appreciate thoughts as to whether I want an M1 or not, not in the sense of "but I'm on an X86" but in the sense of whether or not the C++ toolchains and ecosystems are mature or not.  I'm leaning in that direction because it's a convenient way to also knock being able to optimize for arm off the hardware list, and it's way cheaper apparently.

My Blog
Twitter: @ajhicks1992

2020-12-03 23:58:11

Hi,
I don't reallyw ant to submit an issue, as I've no idea if I'm doing something wrong or not here.

The below code works extremely slowly on my system. I hit the space bar, and the sound plays maybe 0.5-1.0 seconds afterwards.

Here's the code:
]

"""Minimal Synthizer test."""

from typing import Optional

import pyglet
from pyglet.window import Window, key
from synthizer import (Buffer, BufferGenerator, Context, DirectSource,
                       initialized)
from cytolk import tolk


class TestWindow(Window):
    """Override the key handler."""

    audio_context: Optional[Context] = None
    generator: Optional[BufferGenerator] = None
    source: Optional[DirectSource] = None

    def on_key_press(self, symbol: int, modifiers: int) -> None:
        """Intercept the space bar."""
        if symbol == key.SPACE:
            tolk.speak('Shoot.')
            if self.audio_context is None:
                self.audio_context = Context()
                self.generator = BufferGenerator(self.audio_context)
                self.source = DirectSource(self.audio_context)
                self.source.add_generator(self.generator)
            if self.generator is not None:
                if self.generator.buffer is None:
                    self.generator.buffer = Buffer.from_stream(
                        'file', 'shoot.wav'
                    )
                else:
                    self.generator.position = 0.0
        else:
            return super().on_key_press(symbol, modifiers)


if __name__ == '__main__':
    pyglet.options['shadow_window'] = False
    window: TestWindow = TestWindow(caption='Synthizer Test')
    with initialized():
        tolk.load()
        pyglet.app.run()

As far as I can tell it's equally slow playing a wav file or an MP3.

Here are the two files I'm testing with. I converted them from another wav file (not included) using Goldwave.
https://www.dropbox.com/t/FlKInOQWQAM9yMMe.

-----
I have code on GitHub

2020-12-04 00:26:07

@304
Do me a favor and downgrade to 0.7.5.  If this still happens then you've probably just proven that issue #32 is high priority in the real world, not just in my head.  I should drop a second comment there saying that haha actually it's happening now, but eh.
Also possible Linux introduced other regressions, but I guess we'll find out.

My Blog
Twitter: @ajhicks1992

2020-12-04 00:49:53

@305
Yup, 0.7.5 works like a charm. No lag at all... Not sure whether to be sorry or not. Damn Linux! smile

-----
I have code on GitHub

2020-12-04 01:04:22

I mean, half damn linux, half damn me for making an expedient choice that turned out to be worse in the long run than expected.  The timeline on a fix for this is around 2 weeks, give or take.  It's a big refactor.

Maybe worth me yanking 0.7.6, honestly. I'll think about it.  I knew it was bad, but didn't expect this bad.

My Blog
Twitter: @ajhicks1992

2020-12-04 03:57:02

Ok, for anyone following along here, I'm rolling out a 0.7.7 which rolls back all the things in 0.7.6 until I can fix this performance problem.

My Blog
Twitter: @ajhicks1992

2020-12-04 06:49:22

Hi Camlorn,

So I've been playing with Synthizer and I have an issue. I have my sources piping through a reverb effect, and the reverb seems to totally ignore the position of the sources entirely, causing a complete cacophony of noise through the reverb. Is this something I'm doing wrong or is this an actual problem?

I've been going by Bryn, which is now reflected in my profile. Please do your best to respect this :) Mess ups are totally OK though, I don't mind and totally understand!
Follow on twitter! @ItsBrynify
Thanks, enjoy, thumbs up, share, like, hate, exist, do what ya do,
my website: brynify.me

2020-12-04 07:19:21

@309
Most reverb implementations are bad at preserving panning.  You probably need to lower the gain on it so that the panning of the source dominates.  I have plans to look into improving this eventually and ideas on what to do for it, however.

Also look at raising the late reflections delay, which will additionally emphasize the source's panning some even without gain changes.

But honestly the entire point of reverb is to make panning less obvious because that's what reverb is by definition, at least in the context of 3d audio, so you may just be thinking about it wrong.  In particular, a very little bit of reverb goes a very long way.  Even gains of 0.1 aren't unreasonable for it--if you're hearing the reverb as a discrete thing where you're going "wow, it's a reverb" it's too loud, it should just be "huh, this sounds natural", if that makes sense.  Maybe Synthizer needs some better defaults, in order to make this clearer.

My Blog
Twitter: @ajhicks1992

2020-12-04 07:33:47

@310 that actually makes a lot of sense and was what I was going to do, I just wanted to make sure I wasn't going crazy or something. Thanks for clarifying.

I've been going by Bryn, which is now reflected in my profile. Please do your best to respect this :) Mess ups are totally OK though, I don't mind and totally understand!
Follow on twitter! @ItsBrynify
Thanks, enjoy, thumbs up, share, like, hate, exist, do what ya do,
my website: brynify.me

2020-12-04 17:14:22

@308
Magic, thank you mate.

@310
I'm not sure as Synthizer's defaults are bad, although admittedly the default reverb sounds like you're in a metal box or something.

You still planning to ship presets? Or have some kind of market place? The second option could actually be a way of making back some cash, although I've 0 idea how it would work in practise. Maybe sell a yaml file that could be loaded into Synthizer or something.

I love reverb, but know absolutely nothing about tuning it, and honestly I've sort of given up on it, until some helpful person releases synthizer_reverbs, with synthizer_reverbs.Room, synthizer_reverbs.hall ETC.

-----
I have code on GitHub

2020-12-04 18:56:10

@312
Reverb is going to get some improvements.  I've already got one stupid fix pending for it, and we'll have more flexibility around filters and things in the near future.

I do want presets, but taking the time to tune them is going to be a pain.  I'm happy to move in that direction if people will send me some though.  If I do anything for money it might be a patreon at some point, or maybe GitHub sponsors or something, but not until/unless I get enough users that it's worth it--I effectively lose 50% of whatever that is, possibly more, due to tax brackets and transaction fees, and there's not really that much in blindness land anyway.

My Blog
Twitter: @ajhicks1992

2020-12-04 19:23:46

@313
Could always sell support... You'd make a mint off me alone I reckon, with all the questions I've emailed you in the past haha.

What format would you want presets in? I'm thinking of making some kind of reverb editor I can use in my own projects. No idea what output format I'd use yet (code, yaml or whatever). If you've got any ideas, then I could move in that direction, as I'll probably just end up adding in whatever format you want in the future anyways.

-----
I have code on GitHub

2020-12-04 19:34:10

@314
I mean, when all is said and done C++ source code.  What I need is the value of all attributes on the reverb with some names for them.  I'm not going to put it in a separate file or anything like that, just embed it into the binary.

If this ended up as yaml:

presetname:
  attr1: value1

Or something, where attr is the actual attribute on the Python object, it would be easy enough to process to C++ source code via a script.  But that's not required by any means.

My Blog
Twitter: @ajhicks1992

2020-12-04 22:21:31

@315
OK, thank you, that's great. I'll have me a play.

-----
I have code on GitHub

2020-12-05 02:50:51

Ironic since I could probably make some halfway decent presets, but I can't code for shit.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2020-12-05 13:33:09

@317
When I've made my reverb editor, I'll post it so anyone can make presets then send them to @Camlorn.

Won't be starting work on it for a bit though. A week maybe.

-----
I have code on GitHub

2020-12-12 22:48:16

When using reverb, I can hear a sound even when I'm 100 or more units away from the sound.
Is it required to destroy the Synthizer context before calling syz_shutdown?

2020-12-12 22:52:36

The reverb doesn't currently account for distance at all.  If you're simulating a space that is so large that this matters, it probably doesn't deserve reverb in the first place.  I'm going to change this eventually, but it's actually not entirely clear how to go about doing that and I'm not going to touch it until I'm sure what the right answer is.  For the moment, just change the gains on the connections to the effect yourself.

Syz_shutdown destroys handles, or should.  There are a number of bugs related to that which will be fixed in the next release, so it may or may not currently work.  It's probably best to destroy them yourself, at least for now.

My Blog
Twitter: @ajhicks1992

2020-12-13 10:12:59

Hi kamlorn, Even though i am not directly using synthizer, i am using it with that framework engine that Mason created.
I must say, keep up the good work.
I think this is the best open source Lib i know of thus far, accept for OpenAL.
You're reelly doing a good job with this lib, thanx!

best regards
never give up on what ever you are doing.

2020-12-18 13:55:29

so, friends, i got an idea on how to implement play pause
so, when ever we pause, we take the position of the generator and remove the generator. and, when ever we play, we add the generator and seek to the last position.
i don't know if any one got the idea, and, i have not read to all the posts, so.
i just wan't to post my idea here. nothing more.

if you like this post, please thum it up!
if you like to see my projects, feel free to check out my github
if you want to contact me, you can do here by skype. or you can follow me on twitter: @bhanuponguru
discord: bhanu#7882

2020-12-18 15:01:14 (edited by ashleygrobler04 2020-12-18 15:01:36)

isn't pause already implemented?
Or am I thinking os seak?

best regards
never give up on what ever you are doing.

2020-12-18 15:24:37

@322
Yes, you're right, that's how you'd do it. Maybe seek backwards a tiny bit to allow for your computer catching up, since I think propery reads happen by way of a different thread, which is why @Camlorn can't speed them up any... I think that's right anyways.

@323
No, they're not, so @bhanuponguru's solution is best for now, as far as I know.

-----
I have code on GitHub

2020-12-18 16:49:02

Just disconnect the generator from the source and it'll stop advancing until you reconnect it.  There's no need to play with position or anything like that.  Proper pausing should be out soon, but I'm still dealing with the big problem that's blocking Linux.

My Blog
Twitter: @ajhicks1992