Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: allow to change speed without changing the pitch  (Read 11344 times)

0 Members and 2 Guests are viewing this topic.

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
allow to change speed without changing the pitch
« on: January 02, 2014, 03:06:30 pm »
hi,
this is in my idea is very good thing, but maybe it's very very hard to do
in audacity, they used soundtouch library to do that
this is it's website:
http://www.surina.net/soundtouch/
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: allow to change speed without changing the pitch
« Reply #1 on: January 02, 2014, 03:24:38 pm »
It would certainly be a nice feature, however this goes quite a bit into audio processing, thus I wonder if it should really be part of SFML itself. I'm not sure how well SFML lets the users process the audio themselves, but personally I'd say it would be better if we get easily access to the audio data via SFML and then anyone can choose what they want to do with that data.

As for SoundTouch, given that it's under LGPL it's not an option for SFML.

Btw. the links in your signature are broken! ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: allow to change speed without changing the pitch
« Reply #2 on: January 02, 2014, 03:59:55 pm »
If openAL allows it, I don't see why SFML wouldn't.
And indeed, I needed that feature for the last LD48 but I had to use the pitch instead.

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: allow to change speed without changing the pitch
« Reply #3 on: January 02, 2014, 06:29:41 pm »
It would certainly be a nice feature, however this goes quite a bit into audio processing, thus I wonder if it should really be part of SFML itself. I'm not sure how well SFML lets the users process the audio themselves, but personally I'd say it would be better if we get easily access to the audio data via SFML and then anyone can choose what they want to do with that data.

As for SoundTouch, given that it's under LGPL it's not an option for SFML.

Btw. the links in your signature are broken! ;)
firstly, boath of them are open source
so, it's not be a problem
secondly, I've update my links
thanks for your report
if they don't load, report here
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: allow to change speed without changing the pitch
« Reply #4 on: January 02, 2014, 06:38:05 pm »
firstly, boath of them are open source
so, it's not be a problem
But you know what LGPL means? There exist many open-source licenses, a lot of which are incompatible to each other.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: allow to change speed without changing the pitch
« Reply #5 on: January 02, 2014, 07:22:18 pm »
But you know what LGPL means? There exist many open-source licenses, a lot of which are incompatible to each other.
an OS developer must know that
but, libsndfile and OpenAL are open source and boath of them are in LGPL license
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: allow to change speed without changing the pitch
« Reply #6 on: January 02, 2014, 09:04:05 pm »
Quote
If openAL allows it, I don't see why SFML wouldn't.
It doesn't. That's why it requires another third-party library.
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: allow to change speed without changing the pitch
« Reply #7 on: January 03, 2014, 01:59:17 am »
but, libsndfile and OpenAL are open source and boath of them are in LGPL license
True forgot that they are LGPL as well, but that's also a bit of a pain, because we'll always have to link them dynamically.

Btw. when talking about licenses or even in general, it's mostly of no use to say "it's open source", because that just means we can look at the source. But since we're mostly interested in how we can use the code, it's way better to name the license directly. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: allow to change speed without changing the pitch
« Reply #8 on: January 03, 2014, 04:24:57 am »
Quote
If openAL allows it, I don't see why SFML wouldn't.
It doesn't. That's why it requires another third-party library.

Bad :( Well, we'll wait for that for a future version, someday :)

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: allow to change speed without changing the pitch
« Reply #9 on: January 03, 2014, 05:01:54 am »
I know that and of course saw that
you can compile it as a dynamic library and use it in your apps
it is not hard!
what do you think?
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: allow to change speed without changing the pitch
« Reply #10 on: January 03, 2014, 07:15:07 am »
I know that and of course saw that
you can compile it as a dynamic library and use it in your apps
it is not hard!
what do you think?

If you want to use it then go for it, however this is out of the scope of SFML since it is high level audio processing. But feel free to integrate it yourself into your own application  ;)
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: allow to change speed without changing the pitch
« Reply #11 on: January 03, 2014, 09:29:36 am »
what can I say?
i'll use it but I don't know about SFML
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: allow to change speed without changing the pitch
« Reply #12 on: January 13, 2014, 12:52:39 am »
I don't really think that changing speed and pitch is highlevel audio processing, but it might still be a little out of SFMLs scope (although it would be really nice!) and there is the licensing issue.
Processing on sf::SoundBuffer is quiet easy, due to the getBuffer() method. I have done that before.
But I have not succeeded to manipulate sf::Music in real time. So like suggested it would be an awesome addition if there was a way to access the musics samples for processing. This would give everybody the freedom to do what they like (FFT analysis, pitch, distort...)

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: allow to change speed without changing the pitch
« Reply #13 on: January 13, 2014, 10:17:21 am »
it help's many thing related to sound and sound processing
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

Cornstalks

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • My Website
Re: allow to change speed without changing the pitch
« Reply #14 on: February 28, 2014, 03:11:16 am »
A former coworker of mine wrote the atempo filter in FFmpeg, which allows audio to be sped up/slowed down without changing the pitch. The source can be found here for FFmpeg's atempo. If you look at that file, you'll see that it's LGPL, but he links to another (original) implementation that's licensed under the MIT license: Apprentice Video Player (specifically, the yaeAudioTempoFilter.h and yaeAudioFragment.h files).

You could strip out that code and turn it into a library, all based on the MIT license, if you felt so inclined.

But I'd have to agree this is beyond SFML's scope.