Csound Csound-dev Csound-tekno Search About

Re: primenumbers

Date1999-07-09 18:53
FromJ P Fitch
SubjectRe: primenumbers
Amongst the problems are 
1) I can only think of a slow algorithm
2) Csound arguments are floating point, and so you could ask for primes
   beyond the precision of the question

On teh other hand.... one could cheat.

Date1999-07-09 19:02
FromAnders Andersson
SubjectRe: primenumbers
> Amongst the problems are 
> 1) I can only think of a slow algorithm

Me to, but for I-time it wouldn't matter anyway,
and it's up to the user to use it.. =D


> 2) Csound arguments are floating point, and so you could ask for primes
>   beyond the precision of the question

Well, it's only to clamp the input between 1 and 256^sizeof(int)?


The thing is that I had to write a simple program myself to
do this, and that was very easy, and on my 68030/50 it hardly
took any time (well, for numbers in a reasonable range!)



> On teh other hand.... one could cheat.

 Hehe! My favourite subject! =)

I have a source here if someone is interested,
but I'm not very skilled in math, so my implementation
use the brute force method of testing the modulo of every
number... Not very fast but it works.. =)


Another question regarding primes:
If one have an integer X..
Can you be sure that a prime exists between X and 2X?
My intuition tells me this, but you can't know..


// Anders

Date1999-07-14 14:57
Fromjpff@maths.bath.ac.uk
Subject[OT] Re: primenumbers
From:     J H Davenport 

> If one have an integer X..
> Can you be sure that a prime exists between X and 2X?
> My intuition tells me this, but you can't know..

Yes: it's true for all X>1, even for X=1 if you allow 2 as the prime!
This result is actually known as Bertrand's Postulate, and is
Hardy+Wright Theorem 418.
The proof is by exhaustion up to 512, and analysis thereafter.
James


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22094;
          14 Jul 99 17:36 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114RzP-0007Vd-00
	for jpff@maths.bath.ac.uk; Wed, 14 Jul 1999 17:34:35 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (RAA00028); Wed, 14 Jul 1999 17:32:34 +0100 (BST)
Received: from deedee.ex.ac.uk by maths.ex.ac.uk; Wed, 14 Jul 1999 17:32:23 +0100
Received: (from james@localhost)
	by deedee.ex.ac.uk (8.9.3/8.8.8/Debian/GNU) id RAA15200
	for csound; Wed, 14 Jul 1999 17:32:24 +0100
Date: Wed, 14 Jul 1999 17:32:24 +0100
From: James Andrews 
To: csound@maths.ex.ac.uk
Subject: Re: Cscore for Perl
Message-ID: <19990714173224.B15061@maths.ex.ac.uk>
References: <378BD41C.16FAFAFD@rcsreg.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.3i
In-Reply-To: <378BD41C.16FAFAFD@rcsreg.com>; from Tobiah on Tue, Jul 13, 1999 at 05:04:44PM -0700
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

On Tue, Jul 13, 1999 at 05:04:44PM -0700, Tobiah wrote:
> A tiny perl module with the cscore functions can
> be found at:
> 
> 	http://tobiah.rcsreg.com/pub/
> 
> There is also an excellent example of algorithmic
> score generation included.  Get your exciting 
> 3320 bytes of joy now in a compressed tar file.

Other CSound perl users might be interested in the new email list
for the perl MIDI module.

Send a one line message to majordomo@maths.ex.ac.uk saying
 subscribe midiperl


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22559;
          14 Jul 99 21:44 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114VtB-0005HK-00
	for jpff@maths.bath.ac.uk; Wed, 14 Jul 1999 21:44:25 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (VAA05095); Wed, 14 Jul 1999 21:40:38 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 14 Jul 1999 21:40:27 +0100
Received: from root@mail.cs.tu-berlin.de [130.149.17.13] by hermes via ESMTP (VAA06035); Wed, 14 Jul 1999 21:40:26 +0100 (BST)
Received: from gmx.net (130-149-145-53.dialup.cs.tu-berlin.de [130.149.145.53])
	by mail.cs.tu-berlin.de (8.9.1/8.9.1) with ESMTP id WAA10626
	for ; Wed, 14 Jul 1999 22:39:53 +0200 (MET DST)
Message-ID: <378CF642.950A6D02@gmx.net>
Date: Wed, 14 Jul 1999 22:42:42 +0200
From: Steve Kersten 
Organization: K-Hornz network
X-Mailer: Mozilla 4.5 [de] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound 
Subject: 'scheduling' scorefiles?
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by exeter.ac.uk id VAA06035
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hallo.
I have several questions, some of them clearly corresponding to a new
user (like me):

1. Is there a way of triggering score events from within an instrument
(besides the schedule opcode)? More specifically I'm wondering if it is
possible to 'include' whole score files and thus be able to treat them
as a single event.

2. [OT?] Have there been efforts of providing a synth engine (csound in
our case) as (preferably) a netscape plugin? I think I found something
similar on an MIT web page some time ago, but I believe it was SGI only.
I=B4d be very glad if anyone could point me to resources on the internet
or 'hardware' references.

3. Is there a version of csound (Linux/Win) which makes use of several
hardware outputs in 'realtime'? If not, would such a thing be managable,
especially concerning the dynamic 'real-time' positioning of the sources
(e.g. depending on a 'real-time' input signal)?

*Lots* of thanks in advance,

Steve.=20
________________________________________________________________________
K-Labz [a K-Hornz subdivision] - steve-k@gmx.net - http://w3.to/K-Hornz



Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22646;
          14 Jul 99 22:58 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114X1P-0007bq-00
	for jpff@maths.bath.ac.uk; Wed, 14 Jul 1999 22:56:59 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (WAA10887); Wed, 14 Jul 1999 22:56:02 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 14 Jul 1999 22:55:51 +0100
Received: from amsterdam.interport.net [199.184.165.19] by hermes via ESMTP (WAA10557); Wed, 14 Jul 1999 22:55:50 +0100 (BST)
Received: from [216.164.221.113] (216-164-221-113.s113.tnt4.nyw.ny.dialup.rcn.com [216.164.221.113])
	by amsterdam.interport.net (8.8.5/8.8.5) with ESMTP id RAA07811
	for ; Wed, 14 Jul 1999 17:55:56 -0400 (EDT)
X-Sender: jose@pop.interport.net
Message-Id: 
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Wed, 14 Jul 1999 18:03:10 -0400
To: csound@maths.ex.ac.uk
From: jose halac 
Subject: WIN95 supercollider
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

anyone knows if there's a version of SuperCollider for Windows 95?

thanks

jose halac




Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22669;
          14 Jul 99 23:14 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114XIL-0005IK-00
	for jpff@maths.bath.ac.uk; Wed, 14 Jul 1999 23:14:29 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (XAA00727); Wed, 14 Jul 1999 23:11:32 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 14 Jul 1999 23:11:21 +0100
Received: from mail12.svr.pol.co.uk [195.92.193.215] by hermes via ESMTP (XAA10397); Wed, 14 Jul 1999 23:11:20 +0100 (BST)
Received: from modem-61.conjuror.dialup.pol.co.uk ([62.136.147.61] helo=default)
	by mail12.svr.pol.co.uk with smtp (Exim 2.12 #1)
	id 114XFC-0000Sn-00; Wed, 14 Jul 1999 23:11:14 +0100
Message-ID: <009701bece46$9a24fb20$3d93883e@default>
From: Richard Bowers 
To: "Matt J. Ingalls" 
Cc: csound 
Subject: Re: Audio file lengths
Date: Wed, 14 Jul 1999 23:09:29 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Sounds good, Matt. It gets my vote and thanks!

Richard Bowers.



>it should be easy enough to convert sndinfo into an opcode-
>i could see either one opcode with a bunch of outputs
>or a bunch of opcodes with one output.
>
>i could make these if noone else is...
>-matt
>
>



Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22709;
          14 Jul 99 23:47 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114Xmw-0007cK-00
	for jpff@maths.bath.ac.uk; Wed, 14 Jul 1999 23:46:06 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (XAA15770); Wed, 14 Jul 1999 23:44:46 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 14 Jul 1999 23:44:36 +0100
Received: from root@renoir.op.net [209.152.193.4] by hermes via ESMTP (XAA14411); Wed, 14 Jul 1999 23:44:34 +0100 (BST)
Received: from someip.ppp.op.net (d-bm2-17.ppp.op.net [209.152.194.55]) by renoir.op.net (o1/$Revision: 1.18 $) with ESMTP id SAA15906; Wed, 14 Jul 1999 18:44:27 -0400 (EDT)
Message-Id: <199907142244.SAA15906@renoir.op.net>
To: Steve Kersten 
cc: Csound 
Subject: Re: 'scheduling' scorefiles? 
In-reply-to: Your message of "Wed, 14 Jul 1999 22:42:42 +0200."
             <378CF642.950A6D02@gmx.net> 
Date: Wed, 14 Jul 1999 18:52:20 -0400
From: Paul Barton-Davis 
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

>3. Is there a version of csound (Linux/Win) which makes use of several
>hardware outputs in 'realtime'? If not, would such a thing be managable,
>especially concerning the dynamic 'real-time' positioning of the sources
>(e.g. depending on a 'real-time' input signal)?

this is hard because the crystal clocks even on nominally identical
soundcards don't run at the same speed - after some amount of time,
the outputs are out of step. its not impossible to work around it, but
its not easy either, particular if you want to do it in real time
*and* with low latency.

--p


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22742;
          15 Jul 99 0:17 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114YHB-0005KE-00
	for jpff@maths.bath.ac.uk; Thu, 15 Jul 1999 00:17:21 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (AAA05738); Thu, 15 Jul 1999 00:15:11 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Thu, 15 Jul 1999 00:15:00 +0100
Received: from jaguars-int.cableinet.net [193.38.113.9] by hermes via SMTP (AAA05667); Thu, 15 Jul 1999 00:14:59 +0100 (BST)
Received: (qmail 6777 invoked from network); 14 Jul 1999 23:10:46 -0000
Received: from unknown (HELO cableinet.co.uk) (194.117.146.175)
  by jaguars with SMTP; 14 Jul 1999 23:10:46 -0000
Message-ID: <378D1B83.5066B96B@cableinet.co.uk>
Date: Thu, 15 Jul 1999 00:21:39 +0100
From: Richard Dobson 
Organization: Composers Desktop Project
X-Mailer: Mozilla 4.51 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound 
Subject: Re: 'scheduling' scorefiles?
References: <199907142244.SAA15906@renoir.op.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

The Windows version doesn't have code to open multiple cards anyway.
However, the number of channels is passed directly to the MME driver, so
that if a real multi-channel card is available, Csound should be able to
use it up to as many channels as they both support. I will be trying
this very thing out at home soon, using the Creamware Pulsar.

As latency is generally determined by buffer sizes in bytes, it may be
somewhat better for quad streams and higher, than it is for mere stereo.

I understand that m/c drivers are planned for Linux, for cards such as
the Sonorus STUDI/O - but how imminent they are, I don't know.

Richard Dobson


Paul Barton-Davis wrote:
> 
> >3. Is there a version of csound (Linux/Win) which makes use of several
> >hardware outputs in 'realtime'? If not, would such a thing be managable,
> >especially concerning the dynamic 'real-time' positioning of the sources
> >(e.g. depending on a 'real-time' input signal)?
> 
> this is hard because the crystal clocks even on nominally identical
> soundcards don't run at the same speed - after some amount of time,
> the outputs are out of step. its not impossible to work around it, but
> its not easy either, particular if you want to do it in real time
> *and* with low latency.
> 
> --p

-- 
Test your DAW with my Soundcard Attrition Page!
http://wkweb5.cableinet.co.uk/rwd (LU: 6th July 1999)
CDP: http://www.bath.ac.uk/~masjpf/CDP/CDP.htm (LU: 14th June 1999)


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22772;
          15 Jul 99 0:31 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114YTl-0007ev-00
	for jpff@maths.bath.ac.uk; Thu, 15 Jul 1999 00:30:21 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (AAA16760); Thu, 15 Jul 1999 00:28:31 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Thu, 15 Jul 1999 00:28:21 +0100
Received: from sm1.texas.rr.com [24.93.35.54] by hermes via ESMTP (AAA12812); Thu, 15 Jul 1999 00:28:19 +0100 (BST)
Received: from [24.28.85.54] ([24.28.85.54]) by mail.austin.rr.com  with Microsoft SMTPSVC(5.5.1875.185.18);
	 Wed, 14 Jul 1999 18:27:48 -0500
X-Sender: asynth@mail.io.com
Message-Id: 
In-Reply-To: 
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Wed, 14 Jul 1999 18:24:35 -0600
To: jose halac , csound@maths.ex.ac.uk
From: James McCartney 
Subject: Re: WIN95 supercollider
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

At 4:03 PM -0600 7/14/99, jose halac wrote:
>anyone knows if there's a version of SuperCollider for Windows 95?
>
>thanks
>
>jose halac

no there's not..
BeOS is a likely target on intel, but not win.


   --- james mccartney     james@audiosynth.com   http://www.audiosynth.com
If you have a PowerMac check out SuperCollider2, a real time synth program:







Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22810;
          15 Jul 99 1:07 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114Z40-0005LQ-00
	for jpff@maths.bath.ac.uk; Thu, 15 Jul 1999 01:07:48 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (BAA12898); Thu, 15 Jul 1999 01:04:38 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Thu, 15 Jul 1999 01:04:27 +0100
Received: from smtp4.mindspring.com [207.69.200.64] by hermes via ESMTP (BAA08113); Thu, 15 Jul 1999 01:04:25 +0100 (BST)
Received: from Realizer (user-2ive36s.dialup.mindspring.com [165.247.12.220])
	by smtp4.mindspring.com (8.8.5/8.8.5) with SMTP id UAA32241;
	Wed, 14 Jul 1999 20:04:24 -0400 (EDT)
Message-ID: <001401bece55$e4d41980$79d496c0@Realizer.ngt.sungard.com>
From: Michael Gogins 
To: Steve Kersten , Csound 
Subject: Re: 'scheduling' scorefiles?
Date: Wed, 14 Jul 1999 20:06:30 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-Mimeole: Produced By Microsoft MimeOLE V4.72.3110.3
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by exeter.ac.uk id BAA08113
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

My version of Csound, AXCsound, can serve as an ActiveX plugin. Check out
http://www.pipeline.com/~gogins. It can also be found in the summer issue=
 of
the on-line Csound magazine, which you can find from the MIT Csound Front
Page at http://mitpress.mit.edu/e-books/csound/frontpage.html.

I am working on a new version of AXCsound which will be more robust, have
more capabilities, and serve as more of a Java Bean. The main new feature
will be that it will plug into the JavaSound APIs. I am reasonably confid=
ent
that I will also be able to adapt this code to produce a VST version 2
plugin shortly after Steinberg releases the VST 2 SDK.


-----Original Message-----
From: Steve Kersten 
To: Csound 
Date: Wednesday, July 14, 1999 4:41 PM
Subject: 'scheduling' scorefiles?


Hallo.
I have several questions, some of them clearly corresponding to a new
user (like me):

1. Is there a way of triggering score events from within an instrument
(besides the schedule opcode)? More specifically I'm wondering if it is
possible to 'include' whole score files and thus be able to treat them
as a single event.

2. [OT?] Have there been efforts of providing a synth engine (csound in
our case) as (preferably) a netscape plugin? I think I found something
similar on an MIT web page some time ago, but I believe it was SGI only.
I=B4d be very glad if anyone could point me to resources on the internet
or 'hardware' references.

3. Is there a version of csound (Linux/Win) which makes use of several
hardware outputs in 'realtime'? If not, would such a thing be managable,
especially concerning the dynamic 'real-time' positioning of the sources
(e.g. depending on a 'real-time' input signal)?

*Lots* of thanks in advance,

Steve.
________________________________________________________________________
K-Labz [a K-Hornz subdivision] - steve-k@gmx.net - http://w3.to/K-Hornz




Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa23631;
          15 Jul 99 9:28 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 114gqk-0007rq-00
	for jpff@maths.bath.ac.uk; Thu, 15 Jul 1999 09:26:38 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (JAA11407); Thu, 15 Jul 1999 09:23:43 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Thu, 15 Jul 1999 09:23:32 +0100
Received: from smtp03.wxs.nl [195.121.6.37] by hermes via ESMTP (JAA16602); Thu, 15 Jul 1999 09:23:31 +0100 (BST)
Received: from tref.nl ([195.121.56.108]) by smtp03.wxs.nl
          (Netscape Messaging Server 3.61)  with ESMTP id AAA1568
          for ; Thu, 15 Jul 1999 10:22:55 +0200
Message-ID: <378CF0E5.BB0FAAD9@tref.nl>
Date: Wed, 14 Jul 1999 22:19:49 +0200
From: Hans van den Tillaart 
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound Mailinglist 
Subject: Piano sound characteristics
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hello,
I want to know as much there is on  piano sound characteristics. I am
trying to emulate piano or pianolike sounds in CSOUND.
Which formants are there in play?
Do they alter when you increase velocity and or playing from low to
high?
What does exactly change in the spectrum when velocity is increased?
How does the sound evolve over time when looking at the spectrum ,
attackfase release?
Sure there are more characteristics when trying to emulate ... wich?
Is there software for investigating formants?

Many thanks in advance!!
Greetings Hans van den Tillaart.