Re: Panning Sounds

  • From: Jacob Kruger <jacobk@xxxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Wed, 15 Jun 2011 13:53:30 +0200

Ok, one more silly question - how do I link either the FileStream, or the 
channel to a specific file, etc.?

If I try initialising the FileStream object with what I think is sort of a call 
to it's __init__ method, it seems to mention the following parameters, and 
really not too sure what all of them should/would be - that's assuming need to 
provide some of them since think this is an underlying part of the process 
being mentioned in the trace back, or something:
bass_call(BASS_StreamCreateFile, mem, file, offset, length, flags)

As in, I would have assumed something like:
fs = sound_lib.stream.FileStream("file.mp3")

would have done it, but now not sure as such.

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'



---original message---
From: "Q" <q@xxxxxxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, June 14, 2011 3:29 PM
Subject: Re: Panning Sounds


> Jacob,
> You are ... Not quite going about this in the correct way.
> You should install Distribute, available from 
> http://pypi.python.org/pypi/distribute
> This will provide the setuptools package, which is used to install most 
> modern Python packages.
> Once this is done, navigate to the folder and run:
> python setup.py install
> which will actually install the library into your site-packages directory 
> and add it to the global package registry.
> As for documentation, I must admit that sound_libs is limited, but here's 
> the general idea:
> Bass, the underlying library provides functions such as
> BASS_ChannelPlay, which takes as an argument the handle of a channel to 
> play.
> The library models a pseudo-OO structure, with output streams and 
> recordings inheriting the methods of channels, so I followed this in my 
> wrapper. So once you instantiate, for instance, a 
> sound_lib.stream.FileStream object, you can then call play on this object 
> and it will call BASS_ChannelPlay with the channel's handle, which the 
> object stores upon instantiation.
> Furthermore, Bass has many getters and setters which I have replaced with 
> Python properties--so instead of calling 
> BASS_ChannelSetAttribute(<channel_handle>, BASS_AttribPan, -1.0)
> you can just go:
> channel.pan = -1
> I hope this is enough to get you started, and if you have any more 
> questions feel free to contact me off-list.
>      Q
>
>
>
>
>
> On 6/14/2011 8:25 AM, Jacob Kruger wrote:
>> Ok, think figured it out since see that there's a main.py file in actual 
>> sound_lib subdirectory, so can copy that folder/directory over wherever 
>> and then reference it and the objects/modules under there from within 
>> python interpreter, using import statement, and see there's also a .chm 
>> help file there, so let me play around a bit.
>>
>> Stay well
>>
>> Jacob Kruger
>> Blind Biker
>> Skype: BlindZA
>> '...fate had broken his body, but not his spirit...'
>>
>>
>> ----- Original Message ---------------
>>
>> Subject: Re: Panning Sounds
>>     From: Jacob Kruger<jacobk@xxxxxxxxxxxxxx>
>>     Date: Tue, 14 Jun 2011 14:04:08 +0200
>>       To: programmingblind@xxxxxxxxxxxxx
>>
>>> Ok, if I want to try implement use of your soundlib library, how do I 
>>> get it to execute the setup.py code since when I tried it under python 
>>> 2.7, I first had to change the first line to in fact import setup from 
>>> distutils.core - as opposed to setuptools, but distutils.core doesn't 
>>> seem to have any find_packages inside/underneath it?
>>>
>>> Do I need to run this under a different version of python, or do I not 
>>> really need to run setup.py to actually make use of this under python 
>>> itsself, and in that case, which modules should I initially try 
>>> importing then, and/or where should I copy the contents of the .gz file 
>>> I downloaded to under python27's installation directory?
>>>
>>> Sorry, but am still relatively new to python itsself, and hence am 
>>> rather asking these questions.
>>>
>>> Stay well
>>>
>>> Jacob Kruger
>>> Blind Biker
>>> Skype: BlindZA
>>> '...fate had broken his body, but not his spirit...'
>>>
>>>
>>> ----- Original Message ---------------
>>>
>>> Subject: Re: Panning Sounds
>>>    From: Q<q@xxxxxxxxxxxxxxxxxx>
>>>    Date: Tue, 14 Jun 2011 07:27:41 -0400
>>>      To: programmingblind@xxxxxxxxxxxxx
>>>
>>>> If you want to perform this programmatically, use my sound_lib package
>>>> http://hg.qwitter-client.net/sound_lib
>>>> And set the .pan property of the sound from -1 to 1 with 0 being the 
>>>> middle.
>>>> If you're looking to just modify sounds, grab Audacity (the 1.3 beta,
>>>> open the sound, and use I believe shift+p on the track, or effects,
>>>> pan... It likewise ranges from -1 to 1.
>>>>
>>>>
>>>> On 6/14/2011 7:12 AM, Homme, James wrote:
>>>>> Hi,
>>>>>
>>>>> It looks like Windows Recorder can't do this. I want to take a sound
>>>>> and pan it to one side or the other. Is there a utility that can do
>>>>> something like this?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Jim
>>>>>
>>>>> Jim Homme,
>>>>>
>>>>> Usability Services,
>>>>>
>>>>> Phone: 412-544-1810.
>>>>>
>>>>>
>>>>> This e-mail and any attachments to it are confidential and are
>>>>> intended solely for use of the individual or entity to whom they are
>>>>> addressed. If you have received this e-mail in error, please notify
>>>>> the sender immediately and then delete it. If you are not the intended
>>>>> recipient, you must not keep, use, disclose, copy or distribute this
>>>>> e-mail without the author's prior permission. The views expressed in
>>>>> this e-mail message do not necessarily represent the views of Highmark
>>>>> Inc., its subsidiaries, or affiliates.
>>>>
>>>> --------------060007050207050706000401
>>>> Content-Type: text/html; charset=ISO-8859-1
>>>> Content-Transfer-Encoding: 7bit
>>>>
>>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>>>> <html>
>>>>   <head>
>>>>     <meta content="text/html; charset=ISO-8859-1"
>>>>       http-equiv="Content-Type">
>>>>   </head>
>>>>   <body bgcolor="#ffffff" text="#000000">
>>>>     If you want to perform this programmatically, use my sound_lib
>>>>     package<br>
>>>>     <a class="moz-txt-link-freetext" 
>>>> href="http://hg.qwitter-client.net/sound_lib";>http://hg.qwitter-client.net/sound_lib</a><br>
>>>>     And set the .pan property of the sound from -1 to 1 with 0 being 
>>>> the
>>>>     middle.<br>
>>>>     If you're looking to just modify sounds, grab Audacity (the 1.3
>>>>     beta, open the sound, and use I believe shift+p on the track, or
>>>>     effects, pan... It likewise ranges from -1 to 1.<br>
>>>>     <br>
>>>>     <br>
>>>>     On 6/14/2011 7:12 AM, Homme, James wrote:
>>>>     <blockquote
>>>> 
>>>> cite="mid:AB5137F7193A8D49A42CA31303E3FDD544B1F700@xxxxxxxxxxxxxxxxxx"
>>>>       type="cite">
>>>>       <meta http-equiv="Context-Type" content="text/html;
>>>>         charset=us-ascii">
>>>>       <div>
>>>>         <p>Hi,</p>
>>>>         <p>It looks like Windows Recorder can't do this. I want to take
>>>>           a sound and pan it to one side or the other. Is there a
>>>>           utility that can do something like this?</p>
>>>>         <p>  &nbsp;</p>
>>>>         <p>Thanks.</p>
>>>>         <p>  &nbsp;</p>
>>>>         <p>Jim</p>
>>>>         <p>  &nbsp;</p>
>>>>         <p>Jim Homme,</p>
>>>>         <p>Usability Services,</p>
>>>>         <p>Phone: 412-544-1810.</p>
>>>>         <p>  &nbsp;</p>
>>>>       </div>
>>>>       <br>
>>>>       This e-mail and any attachments to it are confidential and are
>>>>       intended solely for use of the individual or entity to whom they
>>>>       are addressed. If you have received this e-mail in error, please
>>>>       notify the sender immediately and then delete it. If you are not
>>>>       the intended recipient, you must not keep, use, disclose, copy or
>>>>       distribute this e-mail without the author's prior permission. The
>>>>       views expressed in this e-mail message do not necessarily
>>>>       represent the views of Highmark Inc., its subsidiaries, or
>>>>       affiliates.<br>
>>>>     </blockquote>
>>>>     <br>
>>>>   </body>
>>>> </html>
>>>>
>>>> --------------060007050207050706000401--
>>>> __________
>>>> View the list's information and change your settings at
>>>> //www.freelists.org/list/programmingblind
>>> __________
>>> View the list's information and change your settings at
>>> //www.freelists.org/list/programmingblind
>> __________
>> View the list's information and change your settings at
>> //www.freelists.org/list/programmingblind
>>
>
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind
> 



__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: