Csound Csound-dev Csound-tekno Search About

[Csnd] How to get started with the API

Date2021-08-13 20:58
FromJana Cole
Subject[Csnd] How to get started with the API
Hi everyone,

A couple of months ago I attempted this but needed to improve my 
knowledge of C++. Now I'm reading the instructions again on how to set 
up to use the Csound API. I have RoryWalsh_CsoundAPI.pdf.

"In order to use the API you will need to download the Csound source 
code which can be found here: http://csound.sourceforge.net/. To build 
the examples below with MinGW you will need to
first create an import library by running the following instructions at 
command prompt.
pexports -o csound32.dll.5.1 > csound32.def
Before proceeding to the next step you may need to edit the newly 
created csound32.def and remove the first line which seems to cause an 
error. Then created the new import library using the
following command:
dlltool --dllname=csound32.dll.5.1 --input-def=csound32.def 
–outputlib=libcsound32.a"

I've been using version 6.15.0 for a couple of years.

I found the pexports tool here 
https://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/ 
dated 2015. Is that the latest one?

Jana Cole

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-08-13 21:51
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] How to get started with the API
Hi Jana,

I think those instructions look a bit old (for Csound 5). You should not need any of that on Windows anymore,
as Csound is built with Visual Studio tools now. All you need is to add Csound64.lib to your link libraries in the
project and also set the header paths to find the Csound headers. These are all provided in the Csound installation,
you will find them in the disk.

This repository might be useful for you

https://github.com/csound/csoundAPI_examples

HTH
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 13 Aug 2021, at 20:58, Jana Cole  wrote:
> 
> *Warning*
> 
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> 
> Hi everyone,
> 
> A couple of months ago I attempted this but needed to improve my
> knowledge of C++. Now I'm reading the instructions again on how to set
> up to use the Csound API. I have RoryWalsh_CsoundAPI.pdf.
> 
> "In order to use the API you will need to download the Csound source
> code which can be found here: https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcsound.sourceforge.net%2F&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7Cf18050dc248443d2ed7d08d95e94c4b2%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637644815321439877%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=0uPnnE%2BREj64uAmglekOMH13GcEVi%2F7A15w2XG0IspM%3D&reserved=0. To build
> the examples below with MinGW you will need to
> first create an import library by running the following instructions at
> command prompt.
> pexports -o csound32.dll.5.1 > csound32.def
> Before proceeding to the next step you may need to edit the newly
> created csound32.def and remove the first line which seems to cause an
> error. Then created the new import library using the
> following command:
> dlltool --dllname=csound32.dll.5.1 --input-def=csound32.def
> –outputlib=libcsound32.a"
> 
> I've been using version 6.15.0 for a couple of years.
> 
> I found the pexports tool here
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fmingw%2Ffiles%2FMinGW%2FExtension%2Fpexports%2F&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7Cf18050dc248443d2ed7d08d95e94c4b2%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637644815321449870%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=kUyYMVwx73QeAlzEiFKekojpARdYQp%2FGRvVbpoIy26g%3D&reserved=0
> dated 2015. Is that the latest one?
> 
> Jana Cole
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7Cf18050dc248443d2ed7d08d95e94c4b2%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637644815321449870%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=w0j1OKAWAH7z1MPw9RAof8pwdtlFo39R47%2B0Bip15nU%3D&reserved=0
> Send bugs reports to
>       https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7Cf18050dc248443d2ed7d08d95e94c4b2%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637644815321449870%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=B13%2FklIxmr9CT4SYJrQIcX6cIXABM9hnDF85WwGDLyo%3D&reserved=0
> Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-08-13 22:05
FromRory Walsh
SubjectRe: [Csnd] [EXTERNAL] [Csnd] How to get started with the API
https://github.com/csound/csoundAPI_examples  also has a Visual Studio project that you can use to get started. If you have Csound installed in the default location it should build out of the box for you. Let us know if you have any issues. You can post here, or file an issue at  https://github.com/csound/csoundAPI_examples

On Fri, 13 Aug 2021 at 21:51, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Hi Jana,

I think those instructions look a bit old (for Csound 5). You should not need any of that on Windows anymore,
as Csound is built with Visual Studio tools now. All you need is to add Csound64.lib to your link libraries in the
project and also set the header paths to find the Csound headers. These are all provided in the Csound installation,
you will find them in the disk.

This repository might be useful for you

https://github.com/csound/csoundAPI_examples

HTH
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 13 Aug 2021, at 20:58, Jana Cole <quikscor@IX.NETCOM.COM> wrote:
>
> *Warning*
>
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>
> Hi everyone,
>
> A couple of months ago I attempted this but needed to improve my
> knowledge of C++. Now I'm reading the instructions again on how to set
> up to use the Csound API. I have RoryWalsh_CsoundAPI.pdf.
>
> "In order to use the API you will need to download the Csound source
> code which can be found here: https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcsound.sourceforge.net%2F&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7Cf18050dc248443d2ed7d08d95e94c4b2%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637644815321439877%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=0uPnnE%2BREj64uAmglekOMH13GcEVi%2F7A15w2XG0IspM%3D&amp;reserved=0. To build
> the examples below with MinGW you will need to
> first create an import library by running the following instructions at
> command prompt.
> pexports -o csound32.dll.5.1 > csound32.def
> Before proceeding to the next step you may need to edit the newly
> created csound32.def and remove the first line which seems to cause an
> error. Then created the new import library using the
> following command:
> dlltool --dllname=csound32.dll.5.1 --input-def=csound32.def
> –outputlib=libcsound32.a"
>
> I've been using version 6.15.0 for a couple of years.
>
> I found the pexports tool here
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fmingw%2Ffiles%2FMinGW%2FExtension%2Fpexports%2F&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7Cf18050dc248443d2ed7d08d95e94c4b2%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637644815321449870%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=kUyYMVwx73QeAlzEiFKekojpARdYQp%2FGRvVbpoIy26g%3D&amp;reserved=0
> dated 2015. Is that the latest one?
>
> Jana Cole
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7Cf18050dc248443d2ed7d08d95e94c4b2%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637644815321449870%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=w0j1OKAWAH7z1MPw9RAof8pwdtlFo39R47%2B0Bip15nU%3D&amp;reserved=0
> Send bugs reports to
>       https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7Cf18050dc248443d2ed7d08d95e94c4b2%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637644815321449870%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=B13%2FklIxmr9CT4SYJrQIcX6cIXABM9hnDF85WwGDLyo%3D&amp;reserved=0
> Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here